Phpcurl_execwindow, linux $ ch = curl_init ();
$ Header = "Accept-Charset: UTF-8 ";
Curl_setopt ($ ch, CURLOPT_URL, $ url );
Curl_setopt ($ ch, CURLOPT_CUSTOMREQUEST, "POST ");
Curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, FALSE );
Curl_setopt ($ ch, CURLOPT_SSL_VERIFYHOST, FALSE );
Curl_setopt ($ ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1 );
Curl_setopt ($ curl, CURLOPT_HTTPHEADER, $ header );
Curl_setopt ($ ch, CURLOPT_USERAGENT, 'mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0 )');
Curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, 1 );
Curl_setopt ($ ch, CURLOPT_AUTOREFERER, 1 );
Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ data );
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true );
$ TmpInfo = curl_exec ($ ch );
This is my code. there is no problem during execution on the local machine. The Windows 64-bit operating system on the local machine prompts an unknown error code or an unknown error when accessing the local machine through the server, the server is a linux system.
Reply to discussion (solution)
Windows and linux are different.
Windows and linux are different.
It is estimated that it is a problem with the linux curl version. let's take a look.
Who prompts: Unknown error number, unknown error ???
Apparently not php
Where is the error prompted?
Who prompts: Unknown error number, unknown error ???
Apparently not php
An error is prompted when $ tmpInfo = curl_exec ($ ch); is executed.
Where is the error prompted?
An error is prompted when $ tmpInfo = curl_exec ($ ch); is executed. Then I re-installed a version of curl7.44.
Php will not give such information!
If this is true, it is clearly the information returned by your target address.