I am a novice programmer at best, but I am trying to play a prank on a friend. Basically, there is a url shortener that he is using to redirect to a rickroll page, and the url shortener has a statistics page. I want to mass request the url to make the statistics go up to a ridiculously high number. I've written a PHP script that should supposedly work, but it isn't so far (I know that just requesting repetitively works, the problem is with the script not the url shortener). Here is my script so far:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "[HIS URL]");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_REFERER,"[FAKE REFERER]");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1");
$i = 0;
header("Content-Type: text/plain");
while(1==1)
{
$execed = curl_exec($ch);
print $i + "\n";
$i++;
}
curl_close($ch);
?>
What am I doing wrong?