Skip to content

Instantly share code, notes, and snippets.

@ganglio
Created September 3, 2012 21:50
Show Gist options
  • Save ganglio/3613852 to your computer and use it in GitHub Desktop.
Save ganglio/3613852 to your computer and use it in GitHub Desktop.
iTunes Festival Apply Script
<?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