php获取某个网站了内容 而且保存为TXT 下次直接从txt读取

WBOY
Release: 2016-06-13 11:19:57
Original
1216 people have browsed it

php获取某个网站了内容 并且保存为TXT 下次直接从txt读取
php获取某个网站了内容 并且保存为TXT 下次直接从txt读取
file_put_contents  好像可以保存!  
具体怎么写! 不会写啊!

代码如下!

<br /><?php <br />function get_flash_url( $url ) <br />{ <br />$lines = file($url); <br />foreach ($lines as $linenum=> $line) { <br />preg_match_all('|<title>([^<>]+)</title>|',$line,$result); <br />$swfurl=$result[1][0]; <br />if(!empty($swfurl)) <br />return $swfurl; <br />} <br />} <br />?><?php <br />$url=$_SERVER["QUERY_STRING"]; <br />$flashurl= get_flash_url($url); <br />echo preg_replace("/[&,?]/","",$flashurl);<br />?><br />
Copy after login


------解决方案--------------------
这个取得了flash的路径 完后你要把路径给写到一个text内?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!