cURL:
1.cURL is a Command line tool for getting and sending datas through URL
Now we can display the Google webpage with search key word "technoblazze" in your server by using cURL
We have to Follow 4 steps to do the above task
1.initialize the curl session
2.set various option for the session
3.Execute the option, fetch and display the datas in your server
4.close the curl session
curl.php
<?php
$curl = curl_init('http://www.google.com/search?q=technoblazze.blog'); //step1
curl_setopt($curl, CURLOPT_FAILONERROR, true); //step2
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl); //step3
curl_close($curl); //step4
echo $result;
?>
Download
No comments:
Post a Comment