-
-
Save esafwan/0cca954f10741a2ad6df to your computer and use it in GitHub Desktop.
Use special DC for scrapping Google by LavoWeb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dc = "173.194.44.35"; | |
$tld = "com"; | |
$ch = curl_init("http://" . $dc); | |
curl_setopt($ch, CURLOPT_HEADER, "Host: www.google." . $tld); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0'); | |
$content = curl_exec($ch); | |
curl_close($ch); | |
echo $content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment