Hi,
I want to download parallel pages from two web sites. i have seen some functions for multi interface but have not get any example in PHP. Can u please let me know how can i use these functions to get two web pages Simultaneously from two different urls.
<?php
$multi_handle = curl_multi_init();
// What to write next to get the below code working in curl_multi_* functions?
?>
<?php
// Old style. This will get one by one pages and takes time.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'www.google.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$str_page_1 = curl_exec ($ch);
curl_close ($ch);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'www.yahoo.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$str_page_2 = curl_exec ($ch);
curl_close ($ch);
?>