There is also a function that begins with Curl_, which allows for many functions. Have time to study well! Here is an introduction to Fscokopen
1.PHP fsockopen Function Description:
Open Internet or Unix domain socket connection (opens socket link)
Initiates a socket connection to the resource specified by target.
Fsockopen () Returns a file pointer which may is used together with the other file functions (such as fgets (), FGETSS (), Fwrite (), fclose (), and feof ()). is to return a file handle
Open PHP Fsockopen This function
PHP Fsockopen requires the php.ini allow_url_fopen option to open.
- $ FP = Fsockopen ("www.example.com",
$errno, $ERRSTR, 30);
- if (! $fp) {
- echo "$errstr ($errno) < BR />n ";
- } else {
- $ out = "Get/http/1.1rn" ;
- $out . = "HOST:WWW.EXAMPLE.COMRN" ;
- $out . = "Connection:closernrn" ;
- Fwrite ($fp, $out);
- while (!feof ($fp)) {
- Echo fgets ($FP, 128);
- }
- Fclose ($FP);
- }
The above is the specific use of PHP fsockopen function, for everyone to reference the study.
http://www.bkjia.com/PHPjc/446176.html www.bkjia.com true http://www.bkjia.com/PHPjc/446176.html techarticle There is also a function that begins with Curl_, which allows for many functions. Have time to study well! Here is an introduction to Fscokopen 1.PHP fsockopen function Description: Open Internet or Unix d ...