Php retrieves the content of a website and saves it as a TXT file and reads it directly from the txt file next time.

Source: Internet
Author: User
Php obtains the content of a website and saves it as TXT. next time, it reads the content of a website directly from the txt file. the content is stored as TXT and the content is directly read from the txt file. next time, it reads file_put_contents & nbsp; & nbsp; It seems you can save it! & Nbsp; how to write it! & Nbsp; not written! The code is as follows! & Lt ;? Php & nbsp; function & nbsp php obtains the content of a website and saves it as a TXT file. The next time you directly read the content from the txt file
Php retrieves the content of a website and saves it as a TXT file. it will be read from the txt file next time.
File_put_contents seems to be saved!
How to write it! No!

The code is as follows!

Function get_flash_url ($ url)
{
$ Lines = file ($ url );
Foreach ($ lines as $ linenum => $ line ){
Preg_match_all ('|([^ <>] +)| ', $ Line, $ result );
$ Swfurl = $ result [1] [0];
If (! Empty ($ swfurl ))
Return $ swfurl;
}
}
?> $ Url = $ _ SERVER ["QUERY_STRING"];
$ Flashurl = get_flash_url ($ url );
Echo preg_replace ("/[&,?] /"," ", $ Flashurl );
?>


------ Solution --------------------
After obtaining the flash path, do you want to write the path to a text file?

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.