php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #1868 specify extra request headers when opening a file from a URL
Submitted: 1999-07-25 17:53 UTC Modified: 1999-07-25 22:06 UTC
From: php at westerdal dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.11 OS: Any
Private report: No CVE-ID: None
 [1999-07-25 17:53 UTC] php at westerdal dot com
There are a few problems with opening of files
via http right now. First is that most web servers
are tuned to handle the new 4.0 browsers.  If they
don't see the right browser they throw bad files 
at you.  If they don't see the right referer string,
they also throw bad files at you.  If they don't see
the right cookie yet again they throw bad files at
you.  Stop this craziness!

So when requesting a file. 
There needs to be more options.

HTTP_USER_AGENT:
HTTP_CONNECTION:
HTTP_ACCEPT: 
HTTP_ACCEPT_LANGUAGE:
HTTP_COOKIE: 
HTTP_REFERER:

Or to create your own tags.

The ability set or add these prior to any connection 
would help!

I am badly in need of setting these options. Can some
tell me, is it a possibility of adding these options
into PHP?

I can set these options with APIs in Windows, 
but I am trying to use UNIX here.

Please Help,

Mr. Westerdal
php@Westerdal.com

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-25 22:06 UTC] rasmus at cvs dot php dot net
Unlikely to happen.  If you need that level of control simply fsockopen() directly to port 80 and send whatever headers are required.  The url capabilities are just a convenience shorthand way to do a full fsockopen().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 09 13:01:27 2024 UTC