Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- $arq = fopen("neo.txt", "a");
- $a = curl_init();
- while(1){
- $cache = rand(0,9999999999999999999);
- //$a = curl_init("http://www.neopets.com/pound/get_adopt.phtml?r=".$cache);
- curl_setopt($a, CURLOPT_URL, "http://www.neopets.com/pound/get_adopt.phtml?r=".$cache."");
- curl_setopt($a, CURLOPT_RETURNTRANSFER, TRUE);
- $b = json_decode(curl_exec($a), true);
- //curl_close($a);
- //print_r($b);
- if(count($b) != "0"){
- //for($i=0;$i<count($b);$i++){
- foreach($b as $b){
- //fwrite($arq, $b['name']." - ".$b['color']." ".$b['species']."\n");
- if(//strtolower($b['species']) == "krawk" ||
- strtolower($b['species']) == "draik" ||
- (strtolower($b['species']) == "lupe" && strtolower($b['color']) == "halloween") ||
- (strtolower($b['species']) == "quiggle" && strtolower($b['color']) == "island")){
- adotar($b['name']);
- }
- }
- }
- sleep(1);
- }
- function adotar($petnome){
- $login = curl_init("http://www.neopets.com/login.phtml");
- curl_setopt_array($login, array(
- CURLOPT_POST => TRUE,
- CURLOPT_POSTFIELDS => "username=caaiiquee&password=senha",
- //CURLOPT_FOLLOWLOCATION => TRUE,
- CURLOPT_SSL_VERIFYPEER => FALSE,
- CURLOPT_SSL_VERIFYHOST => FALSE,
- CURLOPT_HEADER => TRUE,
- //CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],
- CURLOPT_REFERER => "http://www.neopets.com/",
- CURLOPT_RETURNTRANSFER => TRUE
- ));
- preg_match_all("/Set-Cookie: ([^\n]+)/sim", curl_exec($login), $cookies);
- $cookie = "";
- foreach($cookies[1] as $coookie){
- $cookie.=$coookie.";";
- }
- curl_close($login);
- $adotar = curl_init("http://www.neopets.com/pound/process_adopt.phtml");
- curl_setopt_array($adotar, array(
- CURLOPT_POST => TRUE,
- CURLOPT_POSTFIELDS => "pet_name=".$petnome,
- CURLOPT_FOLLOWLOCATION => TRUE,
- CURLOPT_SSL_VERIFYPEER => FALSE,
- CURLOPT_SSL_VERIFYHOST => FALSE,
- //CURLOPT_HEADER => TRUE,
- //CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],
- CURLOPT_COOKIE => $cookie,
- //CURLOPT_REFERER => "http://www.neopets.com/",
- CURLOPT_RETURNTRANSFER => TRUE
- ));
- $curl = curl_exec($adotar);
- curl_close($adotar);
- die($petnome." adotado com sucesso");
- }
- //fclose($arqui);
- //echo "teste";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement