$ch_web = curl_init();
$ch_video = curl_init();
curl_setopt($ch_web, CURLOPT_URL, $url[0]. $params);
curl_setopt($ch_video, CURLOPT_URL, $url[0]. "v=1.0&key=".
$id."&q=".urlencode("site:http://video.triniscene.com ".$_GET['p']));
curl_setopt($ch_web, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch_video, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch_video, CURLOPT_REFERER,
'http://www.triniscene.com/
tsv7/search/google_search.php');
curl_setopt($ch_web, CURLOPT_REFERER,
'http://www.triniscene.com/
tsv7/search/google_search.php');
//$data = curl_exec($ch_web);
//curl_close($ch_web);
//create the multiple cURL handle
$mh = curl_multi_init();
//add the two handles
curl_multi_add_handle($mh,$ch_web);
curl_multi_add_handle($mh,$ch_video);
$running=NULL;
//execute the handles
do {
$data .= curl_multi_exec($mh,$running);
} while ($running > 0);
//close the handles
curl_multi_remove_handle($mh,$ch_web);
curl_multi_remove_handle($mh,$ch_video);
curl_multi_close($mh);
return $data;
Now using it with the regular curl is working...but the multi is
giving me some really weird responses other than the usual "results"
or "no results"
On Aug 27, 8:53 am, "jgeerdes [AJAX APIs \"Guru\"]"
<[EMAIL PROTECTED]> wrote:
> Make sure you are including a valid HTTP_REFERER in your request.
> Beyond that, it's very difficult to tell you what's going on without
> access to the complete php code.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
> [EMAIL PROTECTED]
>
> If you're in the Des Moines, IA, area, check out Debra Heights
> Wesleyan Church!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---