Posted by Windcape Tue 6th Mar 2007 21:41 - Syntax is JavaScript - 28 views
Download | New Post | Modify | Hide line numbers
  1. $fp = fsockopen('fservice.rncs.dk',80,$errno,$errstr,5);
  2. echo 'connection opened
    '
    ;
  3. flush();
  4.  
  5. stream_set_timeout($fp,5);
  6. fputs($fp,$http_request);
  7. echo 'data sent
    '
    ;
  8. flush();
  9.  
  10. while(!feof($fp)) {
  11.     echo fgets($fp, 128); // script gets stuck here.
  12.     flush();
  13. }
  14. echo '
    '
    ;
  15.  
  16. echo 'closing connection
    '
    ;
  17. fclose($fp);
  18. echo 'connection closed
    '
    ;

PermaLink to this entry https://pastebin.co.uk/11493
Posted by Windcape Tue 6th Mar 2007 21:41 - Syntax is JavaScript - 28 views
Download | New Post | Modify | Hide line numbers

 

Comments: 0