Created
September 3, 2012 21:50
-
-
Save ganglio/3613852 to your computer and use it in GitHub Desktop.
iTunes Festival Apply Script
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 | |
$email="robertotorella"; | |
for ($i=3; $i<100; /*8192;*/ $i++) { | |
$bin=strrev(str_pad(decbin($i), 13,'0',STR_PAD_LEFT)); | |
$apply_address=addDot($email,$bin); | |
$st=time(); | |
echo "Applying $apply_address ($i)\n"; | |
$res = apply($apply_address)?"Successfully":"Not successfully"; | |
echo "$res applied T2C:".(time()-$st)."\n"; | |
} | |
function addDot($str,$mask) { | |
$str=str_split($str); | |
$mask = str_split($mask); | |
for ($i=0; $i<count($str); $i++) { | |
$out[]=$str[$i]; | |
if ($mask[$i]) | |
$out[]="."; | |
} | |
return implode("",$out); | |
} | |
function apply($email) { | |
$url="http://www.itunesfestival.com/gb/confirmation?ajax=1&county=1&email=".urlencode($email."@gmail.com")."&events[]=1003&first_name=roberto&last_name=torella&mobile=&terms=1"; | |
$out=file_get_contents($url); | |
return strpos($out,"Entry Successful")!==FALSE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment