We often collect the content of other websites, used to talk about using Fopen,filecontent,curl and other function examples, today we come to Fsockopen to realize this way to read the image on the remote server.
function GetFileSize ($url) {$url =
This article mainly for you in detail the PHP use Fsockopen get/post submission form and upload files, with a certain reference value, interested in small partners can refer to
PHP uses Fsockopen get/post to submit the form and upload files, the
: This article describes how to compare the efficiency of php methods for reading network files curl, fsockopen, and file_get_contents. For more information about PHP tutorials, see. Recently, you need to obtain music data from other websites. The
As the manual says, the only difference between these two functions is that
Pfsockopenis a continuous connection, and
FsockopenNo.
I wrote a code for a moment:
Copy CodeThe code is as follows:
$data = "1,0,721,73,1,0,0,43290000,0,60D81D509BC00451,3
This is what I looked for in the Internet, take the remote file size example.
If the domain name is normal, the file size is returned.
If the domain name is normal and the file does not exist, it returns false.
Now the problem arises, if the
fsocketopen/curl/file_get_contents contrast
fsocketopen
is a lower-level call, a socket call that belongs to the network system
1, Fsockopen returns data that has not been processed, including the length of the
One, the problem descriptionGanglia the various components of the installation (not I installed, only know this information):The cluster has a total of 4 machines, namely 192.168.121.34-37. Gmetad, Gweb and httpd are installed on the 192.168.121.34
PHP uses Fsockopen to send HTTP requests
$value) $values []= "$key =". UrlEncode ($value); $data _string=implode ("&", $values); Find out which port was needed-if not given use standard (=80) if (!isset ($URL _info["Port"]) $URL _in
Fsockopen is very powerful, such as the previous analog HTTP access, analog post/get request, what, here is another example, is to download things. For example, download http://www.nowamagic.net//librarys/webapp/Snow.zip this file, with the
2 Kinds of possibilities 1. Tip "Unable to connect because the target machine is actively rejecting. (10061) ". It's a damn thing. McAfee, remove the antivirus standard protection from Access Protection = "Prevent mass mail worms from sending
The example in this article tells about fsockopen usage in PHP. Share to everyone for your reference.
The implementation methods are as follows:
Copy Code code as follows:
$FP =fsockopen ("127.0.0.1", 80); Open Data Flow
if (!
There are three different systems that you want to use for synchronous login and registration.
Three different systems,I want to use them for synchronous login and registration.So what methods can be thought?Ucenter or sock post.UC is a product of
Use the Fsockopen function returned with Chinese display garbled
Program:
PHP Code
$domain = "6zhou.com"; $whois _server = "whois.ename.com"; $data = ""; $fp = Fsockopen ($whois _server,
Port is already in listening state, why Fsockopen will fail
View with netstat-a command, display TCP 0.0.0.0:2012 www:0 LISTENING
But with the PHP socket access, the code is as follows:
PHP Code
$fp = Fsockopen (' 202.117.xxx.xxx ', $errno,
WordPress's email sending function has always been implemented by plug-ins.
After changing to a host provider, you will find that you cannot send an email. If you use WP-mail-SMTP to send a test email, the following error message is displayed: SMTP-
This article provides a detailed analysis of the differences between fsockopen and pfsockopen. For more information, see the manual. The only difference between the two functions is,
PfsockopenIs continuous connection, and
FsockopenNo.
I wrote the
Use PHP to simulate post and get transfer data to other Web pages or sites
$arr =array (' user ' = ' test ', ' password ' = ') ', Sock_get ($post _url, $arr); Sock_post ($post _url, $arr); Fsocket analog Get Submit function Sock_get ($url, $query =
This article provides a detailed analysis of the differences between fsockopen and pfsockopen. For more information, see the manual. The only difference between the two functions is,
PfsockopenIs continuous connection, and
FsockopenNo.
I wrote the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.