PHP provides three solutions to obtain the remote file size. 1. use file_get_contents () to copy the code as follows :? Php $ filefile_get_contents ($ url); echostrlen ($ file );? 2. use get_headers () to copy the code as follows :? Php $ header _
1.
Several methods for php to read file content are described in detail. Sample Code 1: Use file_get_contents to get content and copy the code as follows :? Php $ urlwww.baidu.com; $ htmlfile_get_contents ($ url); print_r ($ http_response_h sample code
Summary of six methods for php to call remote URLs. Sample Code 1: Use file_get_contents to get content and copy the code as follows :? Php $ urlwww.baidu.com; $ htmlfile_get_contents ($ url); print_r ($ http_response_he example code 1: get content
Use PHPsocke to submit data to the specified page. Using loadpost in jquery and so on cannot get the desired result! So suddenly, I thought about all the things I thought about in the past few days. now I have to do this. now I want to submit data
PHP interview question (2) 1. please compare the main functions of POSIX and Perl-compatible regular expressions
Ereg preg_match
Ereg_replace preg_replace
2. explain the impact of safe_mode on php system functions in PHP. ini.Safe_mode is a
Php code, read for a long time, still do not understand. Who can translate it into c #'s publicfunctionget_userinfo ($ uid) {$ paramsarray (); $ params [uid] $ uid; return $ this-post ($ params, api. tuan.2345.comapigetUserInfo. php);}
I always thought that I could use the data from other websites with ajax. this is also a side of my thoughts over the past few days. but after using firefox for testing, I can't do it now, using load post in jquery and so on cannot get the desired
When we use the phpcurl function, the system prompts Warning: curl_setopt () [function. curl-setopt]: CURLOPT_FOLLOWLOCATIONcannotbe... when we use the php curl function, the prompt Warning: curl_setopt () [function. curl-setopt]:
/** General SMS Platform HTTP interface post method send SMS Instance * Return String * This method is typically called*/function Postsendmessage ($msgContents, $phoneListStr) {//echo $phoneListStr. ' ';$ShortMSGUid ='123456';//SMS Service user
Example code 1: Get content with file_get_contents in get
Copy CodeThe code is as follows:
$url = ' http://www.baidu.com/';
$html =file_get_contents ($url);
Print_r ($http _response_header);
EC ($html);
Printhr ();
Printarr ($http _response_header)
Using system;Using system. Web;Using system. text;
Namespace pub. Class{/// /// Requests operation class/// Public class request2 {# Region get/getint/getfloat/// /// Receive data transfer/// /// parameter name /// value corresponding to 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.