rendered paste bodyfunction 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<count($remoteurls), $i++) {
$grabbedurls[$i] = CurlGrab($remoteurls[$i]);
}
// $grabbedurls is an array containing the content of every grabbed url listed in listofurls.txt