Is it possible to change the User-Agent to something else than "PEAR HTTP_Request class ( http://pear.php.net/ )". Also what about adding a Via header so the requester's IP address is available to the server too?
The HTTP client now has a meaningful "User-Agent" header:
User-Agent: LMS API with LibVpi for PHP 0.5 (http://lms.virtual-presence.org)
I checked the HTTP spec for the "Via" header. I think it is meanst specifically for proxies. Also I would like to add more data from the original request, so I "invented" a "X-For" header. The api now sends something like:
X-For: Remote-Address="123.456.789.123" Referer="http://lms.virtual-presence.org/api/" User-Agent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
3 comments:
Is it possible to change the User-Agent to something else than "PEAR HTTP_Request class ( http://pear.php.net/ )". Also what about adding a Via header so the requester's IP address is available to the server too?
Good idea. Definitely the User-Agent. I'll check the Via-thing.
The HTTP client now has a meaningful "User-Agent" header:
User-Agent: LMS API with LibVpi for PHP 0.5 (http://lms.virtual-presence.org)
I checked the HTTP spec for the "Via" header. I think it is meanst specifically for proxies. Also I would like to add more data from the original request, so I "invented" a "X-For" header. The api now sends something like:
X-For: Remote-Address="123.456.789.123" Referer="http://lms.virtual-presence.org/api/" User-Agent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
Post a Comment