Hey guys
i am trying to communicate with my server using winsock
i am using the get variable and everything is fine...i guess
the php below is what i am posting to
after populating a Label i find that the returned data is the following
VB Code:
  1. 1F
  2. echo $resultaat.'§'.$clickid.'§'.$given.'§'.$returned.'§'.$rank. '';
  3. 0
// Note that echo $resultaat is not what gets rendered, but substitute
// The actual values for what is echoed in th escript
in my script under Winsock1_DataArrival
i am parsing the information by the following
VB Code:
  1. Winsock1.GetData a
  2. b = Split(Mid(a, InStr(1, a, vbCrLf & vbCrLf) + 4), "§")
  3. result.Caption = b(0)
  4. clickid.Caption = b(1)
  5. given.Caption = b(2)
  6. returned.Caption = b(3)
  7. credit.Caption = CInt(given.Caption) - CInt(returned.Caption)
  8. rank.Caption = b(4)
  9. Label10.Caption = a
however, this clearly does not have the intended effect
and i dont see why my script would be rendering
1F
blablabla
0
when i am not even echoing that information
Your support would be appreciated.
PHP Code:
<?php
include('inc_connect.php');
$result=mysql_query("SELECT * FROM recruiter WHERE uname='".$_GET["uname"]."';",$db);
if(
mysql_num_rows($result)<1){
    die(
"Username incorrect§00000000§0§0§");
}
$row mysql_fetch_array($result);
if(
$row["rank"]=="banned"){
    die(
"You are currently banned§00000000§0§0§");
}
$given=$row["given"];
$returned=$row["returned"];
$credit=$given-$returned;
$clickid=$row["clickid"];
$clickname=$row["clickname"];
$clickrace=$row["clickrace"];
$uid=$row["uid"];
$uname=$row["uname"];
$rank=$row["rank"];
$commando=$_GET["c"];
$resultaat="Next id";
if(
$clickid<>"noneleft" and $clickid<>"demo_end"){
    if(
$commando=="click"){
        
mysql_query("UPDATE recruiter SET returned = returned + 1, false_id = 0 WHERE uid = '" $clickid "';",$db);
        
mysql_query("UPDATE recruiter SET given = given + 1 WHERE uid = '" $uid "';",$db);
        
$given++;

        
$resultaat="Click added";
    }elseif(
$commando=="skip"){
        
$resultaat="Skipped id";
    }elseif(
$commando=="report"){
        
mysql_query("UPDATE recruiter SET false_id = false_id + 1 WHERE uid = '".$clickid."';",$db);
        
$resultaat="False id reported";
    }
    
mysql_query("INSERT INTO clicks SET ip = '".$_SERVER["REMOTE_ADDR"]."', clickid = '" $clickid "', clicktime = NOW(), uid = '" $uid "';",$db);
}
mysql_query("DELETE FROM clicks WHERE DATE_SUB(NOW(),INTERVAL 24 HOUR) > clicktime;",$db);
$clickedids=array();
$oldclick=$clickid;
$clickid="noneleft";
$result=mysql_query("SELECT clickid FROM clicks WHERE ip = '".$_SERVER["REMOTE_ADDR"]."';",$db);
if(
$rank=="unregistered" and mysql_num_rows($result)>100){
    
$clickid="demo_end";
}
while(
$row mysql_fetch_array($result)){
    
$clickedids[]=$row["clickid"];
}
$result2=mysql_query("SELECT uid, uname, race FROM recruiter WHERE given - returned > -10  and false_id < 5 and rank <> 'banned' ORDER BY returned-given;",$db);
while(
$clickid=="noneleft" and $row2 mysql_fetch_array($result2)){
    if(
$oldclick<>$row2["uid"] and !in_array($row2["uid"],$clickedids)){
        
$clickid=$row2["uid"];
        
$clickname=$row2["uname"];
        
$clickrace=$row2["race"];
    }
}
mysql_query("UPDATE recruiter SET clickid = '".$clickid."', clickname = '".$clickname."', clickrace = '".$clickrace."' WHERE uid='".$uid."';",$db);
echo 
$resultaat.'§'.$clickid.'§'.$given.'§'.$returned.'§'.$rank'';
?>