PHP's file_get_contents and CURL functions
来源:互联网 发布:snow软件安卓用不了 编辑:程序博客网 时间:2024/06/11 10:01
PHP's file_get_contents and CURL functions
转载:http://www.electrictoolbox.com/php-file-get-contents-curl/
This is a summary of the posts I've written about PHP's file_get_contents functions when used to download remote content (e.g. webpages, XML files, images etc) and the CURL functions which are used to do the same thing.
PHP Manual Pages
As always, don't forget to read the manual pages from the PHP manual; they don't always cover everything that well and are sometimes lacking in examples but always make a good starting point when wanting to know how a particular function works. The user submitted comments are often useful too.
- file_get_contents
- CURL
file_get_contents() posts
- Change the user agent string in PHP which shows how to set the user agent which the scripts/logs at the server you are downloading content will see; this is useful to mask your script and make it appear like a browser instead of a bot.
- Sending a username and password with PHP file_get_contents() using http basic authentication which is needed if a website is password protected. This won't help you if need to log in using a web form, just for http authorization .
CURL
- Setting the user agent with PHP CURL which shows how to set the user agent for the same reasons as listed in the file_get_functions() post linked to above.
- Sending a username and password with PHP CURL; as with the same file_get_contents() post listed above this is for sending a username and password with http basic authentication.
- PHP CURL and Cookies which shows how to configure CURL to store cookies in a cookie file which can be used both now for session cookies, and in the longer term if the same file is reused for cookies that are set for a longer duration.
- Submitting a form post with PHP and CURL for doing just that :)
- Setting the http referer with PHP CURL in case you need to scrape a page that expects a referrer
- MAMP PHP cURL and SSL which deals with an issue using MAMP on Mac OSX not being able to access https:// URLs
- PHP's file_get_contents and CURL functions
- php fsockopen curl file_get_contents
- PHP使用curl替代file_get_contents
- php fopen file_get_contents curl区别
- PHP使用curl替代file_get_contents
- [PHP]fopen、file_get_contents、curl区别
- php 模拟 post curl sock file_get_contents
- PHP利用Curl、socket、file_get_contents POST数据
- PHP - 利用Curl、socket、file_get_contents POST数据
- PHP:file_get_contents & curl 的代理使用方法
- curl()、file_get_contents()、snoopy.class.php 优缺点
- PHP利用Curl、socket、file_get_contents POST数据
- php中 curl, fsockopen ,file_get_contents 三个函数
- php fopen,file_get_contents,curl的区别
- php中 curl, fsockopen ,file_get_contents 三个函数
- php file_get_contents伪造user_agent curl设置
- php file_get_contents curl发送cookie,使用代理
- php远程抓取函数curl(),file_get_contents
- poj 2503 Babelfish
- RelativeLayout及其相关的属性
- 采用utf8编码的php文件session_start()错误
- 抓网页内容file_get_contents curl fopen
- nat技术简介(转载)
- PHP's file_get_contents and CURL functions
- ( 转载)纯Java文件操作工具,支持文件、文件夹的复制、删除、移动
- 使用Android自带Gallery组件实现CoverFlow
- 强类型vs弱类型 差别是什么?
- javascript初接触(三)
- ANSI C 与 K&R C
- 2011ACM福州网络预选赛B题 HDU4062 Abalone
- 让背景小图不是拉伸而是多个重复(类似于将一张小图设置电脑桌面时的效果)
- struts2的工作原理