curl url에 변수를 전달하고 싶지만 오류가 발생합니다. HELP ME에서의 코드는 curl을 사용하여 url에 변수 전달하기
$url = 'https://graph.facebook.com/$id/comments?message=$messages&method=post&access_token=$m';
입니다
:$arr = file('comments.txt',FILE_IGNORE_NEW_LINES); $messages = shuffle($arr);
echo messages;
$id = trim($_POST['post_id']);
$url = 'graph.facebook.com/$id/…;;
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL, '$url'); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,200); curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$send = curl_exec($curl_handle); curl_close($curl_handle);
당신은 당신의 코드와 오류를 게시 할 수 있습니까? –
$ arr = file ('comments.txt', FILE_IGNORE_NEW_LINES); $ messages = shuffle ($ arr); 에코 메시지; $ id = trim ($ _ POST [ 'post_id']); $ url = 'https://graph.facebook.com/$id/comments?message=$messages&method=post&access_token=$m'; $ curl_handle = curl_init(); curl_setopt ($ curl_handle, CURLOPT_URL, '$ url'); curl_setopt ($ curl_handle, CURLOPT_CONNECTTIMEOUT, 200); curl_setopt ($ curl_handle, CURLOPT_RETURNTRANSFER, 1); $ send = curl_exec ($ curl_handle); curl_close ($ curl_handle); – user3563010
질문에 대신 게시 할 수 있습니까? –