I tried making a script that uses curl and changes the URL everytime it loops. The problem is that only the first URL is being activated. What do you think is the problem?
Here is my script:
while($row=mysql_fetch_array($result)) // fetch data from mysql
{
$url = $row['address'];
$host = $url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$host);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
$curl_result = curl_exec($ch);
curl_close($ch);
}
Here is my script:
while($row=mysql_fetch_array($result)) // fetch data from mysql
{
$url = $row['address'];
$host = $url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$host);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
$curl_result = curl_exec($ch);
curl_close($ch);
}