From: [EMAIL PROTECTED]
Operating system: Linux
PHP version: 4.1.1
PHP Bug Type: Feature/Change Request
Bug description: file() MUCH faster than fsockopen() + fgets() but we should be
able to set th
When tring to open a file for remote edition like:
$file = file("http://myaddress.com/users.php?op=xz&f=w");
Whe can't set the headers.
And why one would like to?
1 - Readfile throws the content to std out.
2 - fsockopen takes too much time to do the same:
$sck = fsockopen($host,$port,&$errno,&$errstr);
fputs($sck,$request);
while(!feof($sck)) {
$result .= fgets($sck,128);
}
This will take about 300-400% more time compared with file() or
readfile(). (WHY??? Ive tested the int lenght of fgets() with
2,32,64,128...4096 and it is still very slow: filesizes > 400kb ~ 90-120
sec (@ 256k) when file() does the same in ~ 20-30 sec).
I've not tested cURL yet, but I think PHP should support this w/o 3
parties..
Thanks ppl!
--
Edit bug report at http://bugs.php.net/?id=16303&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16303&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16303&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16303&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16303&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16303&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16303&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16303&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16303&r=submittedtwice