PHP HttpClient
来源:互联网 发布:fifa online3 mac版 编辑:程序博客网 时间:2024/06/06 15:42
转自http://www.wappler.eu/php-httpclient/ PHP-HttpClient based on Simon Willisons HttpClient Version 0.9. HttpClient is a client class for the HTTP protocol. It can be used to interact with another web server from within a PHP script. As well as retrieving information from a server, HttpClient can interact with a server via POST or GET. It can therefore be used as part of any script that needs to communicate with an application running on another site. Zu Deutsch: PHP-HttpClient ist eine Klasse, mit der man einen Browser in PHP simulieren kann. So kann man Inhalte von anderen Webseiten holen und in die eigene Webseite einbinden. Ich musste die Version von Simon Willison ein wenig erweitern, um mehrere Dateien per POST übertragen zu können. Download HttpClient.class.php Grabbing an HTML page (static method) Posting a form and grabbing the response (static method) The static methods are easy to use, but seriously limit the functionality of the class as you cannot access returned headers or use facilities such as cookies or authentication. A GET request with debugging turned on A GET request demonstrating automatic redirection Check to see if a page exists Fake the User Agent string Log in to a site via a login form, then request a page In this example, it is assumed that correctly logging in will result in the server sending a sesssion cookie of some sort. This cookie is resent by the HttpClient class automatically, so a request to a page that requires users to be logged in will now work. Using HTTP authorisation Note that the class uses the American spelling ‘authorization’ to fit with the HTTP specification. Print out the headers from a response Setting the maximum number of redirectsPHP-HttpClient
Features
Download
Usage
A simple GET request using the class
- PHP HttpClient
- HttpClient.class.php 类
- HttpClient php类库
- HttpClient.class.php
- PHP HttpClient模拟登陆
- PHP HttpClient封装
- php httpclient 获取cookie
- PHP的一个HttpClient类
- HTTP请求类 - HttpClient.class.php
- Php模拟登录工具类 HttpClient
- php中httpclient的实现方法
- opencv和php和httpclient的关联
- php post 数据 HttpClient
- HttpClient
- HttpClient
- httpClient
- HttpClient
- HttpClient
- Window 消息大全使用详解
- this 和 super
- IP地址的分配
- 信息系统基础学习
- #pragma 预处理指令详解
- PHP HttpClient
- JNDI简介
- 技巧:求能被size整除的大于或等于num的最小值
- MySQL+C的程序入门。
- 记北京的第二年--2007(一)
- 解析动态联编
- vmware虚拟主机扩容和linux增加分区及挂载
- 在CSDN开博啦!09年3月14日
- 内联(inlining)