2uzhan.com
Advertisement
Now Place:2uzhan.com » file() hangs on certain URL

file() hangs on certain URL

PHP @ December 30, 1969   Views:0

I'm trying to examine a URL using the file() command. I've done this many times and never had a problem, but there's one URL that simply won't work. The PHP script never finishes "loading" the URL.

I'm wondering if there's something about the file itself that prevents PHP from loading it. Maybe it's something on their server...?

Here's the code:

$talbott = file ("http://www.dailycamera.com/bdc/columnist/0,1713,BDC_2421_4949,00.html");
exit;

Here's the first few lines of the file that PHP refuses to read (you can view the whole file by looking at the link).

<!-- Vignette V/5 Thu Jul 03 15:37:30 2003 -->

<HTML>

<HEAD>
<TITLE>The Daily Camera: Columnists</TITLE>

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" href="/bdc/cda/styles/sections">

Thanks in advance for any insight.

--------------Solutions-------------

when I brought up that url in opera, opera reported that it was loading almost half a meg of data

My understanding is that file() only reads in the file itself, not image data referred to by <img> tags or the like.

Even if this were only a size issue, the page should eventually load.

I also have new information... returning from lunch I finally had an error message:

Warning: php_hostconnect: connect failed in /home/moviehabit/public_html/test.php on line 3

Warning: file("http://www.dailycamera.com/bdc/columnist/0,1713,BDC_2421_4949,00.html") - Bad file descriptor in /home/moviehabit/public_html/test.php on line 3

Tags:
© 2018 2uzhan.com Contact