1
下面的代碼只發送一個變量到我的腳本,但它正常運行通過循環。我希望得到這方面的幫助。謝謝。curl while while循環只發送一次變量,但多次運行循環
<?php
$result = mysql_query("SELECT * FROM users WHERE id =$id");
while($row = mysql_fetch_assoc($result)){
//$user_phone = $row['phone'];
$phone = $row['email'];
$email = $row['phone'];
$url = 'http://example.com/request.php?phone='.$phone.'&email='.$email.'';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_TIMEOUT => '5'
));
$resp = curl_exec($curl);
curl_close($curl);
}
?>
工作很好阿米爾真的很感謝你的幫助,謝謝。 – cusackBOOM 2013-04-26 12:09:49