Ben bir cURL sorgu tarafından döndürülen kod yürütmesine çalışıyorum.
Aşağıdaki kod benim webserver bir sayfa sorgular:
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "http://web.com/foo.php");
curl_setopt ($ch, CURLOPT_HEADER, 0);
$res = curl_exec ($ch);
curl_close ($ch);
echo $res;
I would like to do so by only modifying the code in foo.php. I have tried returning PHP code as the result in foo.php with an eval() command but it doesn't seem to work.
Herhangi bir fikir?
EDIT: Beyler, ben bir kamu web sitesi için bu yapmıyorum. Bu özel bir proje için, ben yalnızca kullanıcı olacaktır. Ben internet üzerinden canlı olurdu böyle bir şey asla yapmam, büyük bir güvenlik sorunu olduğunu biliyorum.