help in php
Posted: Tue Jul 29, 2008 2:36 am
hi,
i'm trying to make a php function but keep getting an :
* Zero Sized Reply
Squid did not receive any data for this request
here's my code :
-----------
function addchips($user,$amount)
{
mysql_connect( "localhost", "host_mavens", "*******" );
mysql_select_db( "host_mavens" );
$sql = mysql_query( "SELECT * FROM link where user='".$user."'");
$data = mysql_fetch_array( $sql );
$check1 = $data['poker'];
$check1a = $data['user']; // uit database
if ( $check1 =='' )
{ echo $user." heeft nog geen pokeraccount contact : ".$user."<br>"; }
if ( $check1a == $user )
{ echo " adding : ".$amount." to ".$check1." account of : ".$user."<br>";
$url ="http://87.66.13.38:8087/control?Passwor ... =".$amount;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
}
-------------------
when changing the last part of the code to :
----
{ echo " adding : ".$amount." to ".$check1." account of : ".$user."<br>";
$url ="http://87.66.13.38:8087/control?Passwor ... =".$amount;
echo $url;
}
----
i get response :
http://87.66.13.38:8087/control?Passwor ... Amount=400
so the $url is correct when i copy and paste it in my browser i get :
Result=Ok
----
Can someone tell me how i can solve this ?
i'm trying to make a php function but keep getting an :
* Zero Sized Reply
Squid did not receive any data for this request
here's my code :
-----------
function addchips($user,$amount)
{
mysql_connect( "localhost", "host_mavens", "*******" );
mysql_select_db( "host_mavens" );
$sql = mysql_query( "SELECT * FROM link where user='".$user."'");
$data = mysql_fetch_array( $sql );
$check1 = $data['poker'];
$check1a = $data['user']; // uit database
if ( $check1 =='' )
{ echo $user." heeft nog geen pokeraccount contact : ".$user."<br>"; }
if ( $check1a == $user )
{ echo " adding : ".$amount." to ".$check1." account of : ".$user."<br>";
$url ="http://87.66.13.38:8087/control?Passwor ... =".$amount;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
}
-------------------
when changing the last part of the code to :
----
{ echo " adding : ".$amount." to ".$check1." account of : ".$user."<br>";
$url ="http://87.66.13.38:8087/control?Passwor ... =".$amount;
echo $url;
}
----
i get response :
http://87.66.13.38:8087/control?Passwor ... Amount=400
so the $url is correct when i copy and paste it in my browser i get :
Result=Ok
----
Can someone tell me how i can solve this ?