From: phpdig at toiletoine dot net Operating system: Linux k2.4.18, apache 2.0.44 PHP version: 4.3.0 PHP Bug Type: Feature/Change Request Bug description: fopen_wrappers and http headers as client
Hello, In my php project (phpDig, a small robot/search engine), i needed to send "Cookie: ..." HTTP header when i use the file() function with http fopen_wrappers. I needed this in order to spider sites setting cookies (session, selected language, etc...). The only solution i found was inserting my custom headers in the ini constant "user_agent" with ini_set. This works, but i mean that could be removed in an future release of PHP : ini_set('user_agent','phpdig/1.6'."\n".'Cookie: foo=bar'."\n".'Cookie: bar=foo'); Of course, setting other client headers in "user_agent" is not very good. I suggest to add another ini constant ("http_client_headers" ?) that will contain those headers. I mean it would be useful. Best regards, Antoine Bajolet -- Edit bug report at http://bugs.php.net/?id=22705&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22705&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22705&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22705&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22705&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22705&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22705&r=support Expected behavior: http://bugs.php.net/fix.php?id=22705&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22705&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22705&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22705&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22705&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22705&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22705&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22705&r=gnused