View Single Post
Old 02-28-2008, 02:37 PM   #5 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

You can also set the User Agent by specifying something for the [b]user_agent[/i] setting in php.ini (the ini_set() function will work). Or, you can also create a stream context (stream_context_create()) and specify the User Agent header in there. Both of these methods will enable standard file functions (fopen/fread, file_get_contents, etc) to send along the UA without using the cURL extension.
Salathe is offline  
Reply With Quote
The Following User Says Thank You to Salathe For This Useful Post:
DeMo (02-28-2008)