function CurlGrab($remoteurl) { $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $remoteurl); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $contents = curl_exec($ch); return $contents; } $remoteurls = array(); $grabbedurls = array(); $urlhandle = fopen("./listofurls.txt", r); while (!feof($urlhandle)) { $remoteurls[] = fgets($urlhandle); } for ($i=0, $i