Since on Google AppEngine CURL and file writing are not allowed I need help to convert the following CURL request so it can be run on it:
$ch = curl_init("http://example.com/external.php");
$fp = fopen("internal.php", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
header("Location:internal.php");