Created
June 5, 2012 04:40
-
-
Save Barneybook/2872674 to your computer and use it in GitHub Desktop.
bot php file
This file contains 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 | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_URL, "haplay.no-ip.org/haplay/"); | |
curl_setopt($ch, CURLOPT_HEADER, false); | |
curl_setopt($ch, CURLOPT_USERAGENT, "Google Bot"); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
$output = curl_exec($ch); | |
curl_close($ch); | |
echo $output; | |
$curl = curl_init(); | |
curl_setopt ($curl, CURLOPT_URL, "http://www.mywebsite.com"); | |
curl_setopt ($curl, CURLOPT_POST, 1); | |
curl_setopt ($curl, CURLOPT_POSTFIELDS, "usr=username&pswd=password"); | |
curl_exec($curl); | |
echo curl_error($curl); | |
curl_close($curl); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can this bot work for any website