PHP while while curl IFisset错误

时间:2017-03-22 19:47:53

标签: php mysql curl

这是我的剧本

$id=$row['user_id'];
if (isset($_GET['trea'])){

$ch = curl_init();  // Initialise a cURL handle


// Setting proxy option for cURL
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXY, '$proxy_ip');
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 100);
curl_setopt($ch, CURLOPT_URL, $final);

$results = curl_exec($ch);  // Execute a cURL request
curl_close($ch);   
 echo $results;
 }
?>

<form action='admin.php' method='get'>
<input type=submit name="trea" value="<?php echo $id ?>">

现在如果我点击我页面上的提交按钮。它会向所有行发送CURL请求而不是该特定行。所以我试图改变这个

  

if(isset($ _ GET [&#39; trea&#39;])){

  

if(isset($ _ GET [&#39; $ id&#39;])){

  

<input type=submit name="trea" value="<?php echo $id ?>">

<input type=submit name="$id" value="<?php echo $id ?>">

当我尝试提交按钮时。它什么也没做。我做错了什么?当我点击该行的提交按钮

时,我想在该特定行上运行CURL请求

0 个答案:

没有答案