Jump to content

michellylei

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

michellylei's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks so much. so if i do this way: fwrite($fp, $out); fwrite($fp, $out1); fwrite($fp, $out2); while (!feof($fp)) { echo fgets($fp, 128); } so fgets will read all infomation which reply to 3 fwrite call, right? but u can not know which data are reply to which fwrite call,right?
  2. <?php $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: www.example.com\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> 1, when fwrite called, how many msg reply from www.example.com? why use loop to read? 2, can i call fwrite twice first, then call fget twice to get feedback?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.