大家早上好,感谢上次fdipzone帮我解决input text提交网页保存源码的问题
如果我想用一个textarea输入很多url,以回车作为间隔,保存每个网页,名称以数字序列为名。
下面这个代码改怎么改一下呢 谢谢
@jam00 @xmt1139057136 @fdipzone
<html><body><div align="center"><form name="form1" method="post"><input id="url" name="url" type=text></form></div></body></html> <?php $url = isset($_post['url'])? $_post['url'] : ''; $ch = curl_init($url); curl_setopt($ch,curlopt_returntransfer,true); curl_setopt($ch,curlopt_timeout,5); $html = curl_exec($ch); if($html !== false){ /*echo $html;*/ $fname="vb.htm"; $fd=fopen($fname,"w"); $ok=fwrite($fd,$html); fclose($fd); }?>
curl_setopt($ch, CURLOPT_FILE, 'vb.htm');
就自动保存到文件了,无需 17 行以后的操作
输入了多个地址,当然是切割成数组,一个个来啦
可以借鉴csdn论坛的编辑输入框
curl_setopt($ch, CURLOPT_FILE, 'vb.htm');
就自动保存到文件了,无需 17 行以后的操作
输入了多个地址,当然是切割成数组,一个个来啦
用WEBBROWSER 和 PHP CURL 配合就可以搞定了。
用WEBBROWSER 和 PHP CURL 配合就可以搞定了。
是的,批量处理就OK
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号