Free Mobile Web Development, Cheap Web Design Kolkata, Cheap Resellers Hosting Kolkata, Free Domain Resellers Kolkata, Cheap Domain Name Registration Kolkata. Free Web Masters' Resources India, Free Web Design Tutorial India. START YOUR DOMAIN RESELLERS BUSINESS FOR FREE
Saturday, May 8, 2010
Brand New Human Resource & Project Management Tool ... Coming Up Next July
Saturday, October 3, 2009
Changing Default User Agent String Using PHP
It's easy to change the default user agent string of your php script (web server). Just use this piece of code in your crawler/scrapper script.
ini_set("user_agent","TechBongo Crawler V1.0");
?>
If you want to test this piece of PHP code, write the following PHP code in a PHP file and execute the file. Now check the visitor log of the web page and you'll see your custom user agent string there, instead of the default user agent string.
ini_set("user_agent","Your User Agent String");
$data = file_get_contents("http://you-page-url.com",0);
Print strip_tags($data,"");
?>