To log on to Baidu, you must first capture the Baidu logon package. Because it is a webpage logon, httpwatch is the most convenient. The test account I use is itiandatest1 and the password is itianda. The packet capture result is as follows:
Copy
How can I get the URLhttp: // www.chong4.com.cn/cydb/go.php after this URL jump through PHP? 7218_29882_22t ~~ How to get the URL after this URL jump through PHP, $ url & nbs how to get the URL after this URL jump through
Php uses curl to determine whether a remote file exists
// Determine the remote file
Function check_remote_file_exists ($ url)
{
$ Curl = curl_init ($ url );
// Do not retrieve data
The code is as follows:
Judging remote Files
function Check_remote_file_exists ($url)
{
$curl = Curl_init ($url);
Do not retrieve data
curl_setopt ($curl, Curlopt_nobody, true);
Send Request
$result = curl_exec ($curl);
$found = false;
If the
Php uses curl to determine whether a remote file exists. some of our programs need to determine whether the file exists before performing subsequent operations.
The code is as follows:
// Determine the remote fileFunction check_remote_file_exists
Php uses curl to determine whether a remote file exists. the code is as follows:
// Determine the remote file
Function check_remote_file_exists ($ url)
{
$ Curl = curl_init ($ url );
// Do not retrieve data
Curl_setopt ($ curl, CURLOPT_NOBODY, true )
: This article describes how to set an http packet header using the phphpheader function. if you are interested in the PHP Tutorial, refer to it.
// Define the encoding headers ('content-Type: text/html; charset = utf-8 '); // Atomheader
Php uses curl to determine whether a remote file exists. Copy the code as follows: determine the remote file functioncheck_remote_file_exists ($ url) {$ curlcurl_init ($ url); do not retrieve data curl_setopt ($ curl, CURLOPT_NOBODY, true); send
http://www.chong4.com.cn/cydb/go.php?7218_29882_22t
how he jumps ~ ~
How to get the URL after this URL jump via PHP
Reply to discussion (solution)
If you do not jump within the code, it is estimated that the socket will be used to catch the
php datetime function date ()
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;
Lowercase m represents the number
The PHP header function sets an example of an HTTP message header,
Define the encoding header (' Content-type:text/html;charset=utf-8 ');Atomheader (' Content-type:application/atom+xml ');Cssheader (' Content-type:text/css ');Javascriptheader ('
Copy CodeThe code is as follows:
Judging remote Files
function Check_remote_file_exists ($url)
{
$curl = Curl_init ($url);
Do not retrieve data
curl_setopt ($curl, Curlopt_nobody, true);
Send Request
$result = curl_exec ($curl);
$found = false;
If
PHP datetime function Date ()
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;
Lowercase m represents the
The AJAX request (asynchronized) differs from the message header (header) of the normal request (synchronized):String Reqtype = Request.getheader ("X-requested-with"), if (null = = Reqtype) {//normal request}else if (Reqtype.equals (" XMLHttpRequest
HTTP Header Explanation================================================?AcceptTell the Web server what type of media you accept, */* represents any type, type/* represents all subtypes under that type, Type/sub-type.?Accept-charsetThe browser
Meta is an accessible tag in the head area of the HTML language. In almost all pages, we can see HTML code similar to the following: http-equiv="content-Type" content="text/html; charset=gb2312"> </head>Maybe you think the code is dispensable. In
PHP provides a large number of built-in functions that enable developers to work on time, greatly improving productivity.Describes some common PHP date and time functions and the processing of dates and times.Frequently used date and time processing
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.