php - How to convert CURLOPT_FILE for Googel AppEngine? -
since on google appengine curl , file writing not allowed. me out convert following curl request can 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");
you need write file google cloud storage. like
$in = "http://example.com/external.php"; $out = "gs://bucket/internal.php"; file_put_contents($out, file_get_contents($in));
Comments
Post a Comment