fake user agent

mylikes786

Registered Member
Joined
Oct 31, 2013
Messages
81
Reaction score
7
As my title how can i spoof user agentusing php
There are some addon available for firefox or chrome to change user agent

but i want do this in php code so my all site load and show look of that any user agent

How can i do this
 
Last edited:
<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://mysite.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT,'NokiaN70-1/1.0526.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1');
$data = curl_exec($ch);
curl_close($ch);
?>

<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://mysite.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT,'NokiaN70-1/1.0526.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1');
$data = curl_exec($ch);
curl_close($ch);
?>

it show blank page :/




it show blank page :/
 
Back
Top