first thanks for your help and patience. Your advice it is being really useful to help me to understand how Livecode works. Am reading manuals, forum posts and checking every video but takes some time to understand it.
Using sockets, when connect to servers to get information, rule says they will return lines finished with cr+lf. But...
1- how to still reading while there are data available?
2- how close connection after a reasonable ammount of time? lets say 5-10 seconds.
3-Livecode approach to handle sockets looks a bit confusing to me and considering am new to the language too... I have all ingredients to get it not working. What's the way to translate this php code to livecode? I tried checking by EOF but doesn't works.
Code: Select all
try{
$conn = fsockopen($server, 80); //server name and port
}
catch(Exception $e){
return FALSE;
}
fputs($conn, $request."\r\n");
$response = "";
while(!feof($conn)){
$response .= fgets($con, 128);
}
fclose($conn);
Jose