php - Is it possible to Include variable with URL in CURLOPT_URL? -
i storing facebook page id in variable pageid, , want graph api retrieve information these ids. trying include variable $pageid rest of url, not return anything.
would suggest alternatives, or whether doing wrong?
$pageid = substr($_post["url"], $pageidposition +1); echo $pageid; echo "<br />\n"; echo "<br />\n"; // create new curl resource $ch = curl_init(); // set url , other appropriate options curl_setopt($ch, curlopt_url, "http://graph.facebook.com/" + $pageid); curl_setopt($ch, curlopt_header, 0); // grab url , pass browser curl_exec($ch); // close curl resource, , free system resources curl_close($ch);
Comments
Post a Comment