タグ

HTTP_Request2とpearに関するtacchiniのブックマーク (4)

  • [php][pear]HTTP_Request2のサンプル#3 | うえちょこ@ぼろぐ

    この記事は、HTTP_Requestのマニュアルに載っている全サンプルコードをHTTP_Request2対応で書き換えてみる企画の3回目です。HTTP_Request2クラスの概要を知りたい方は、下記リンクの#1を参照ください。 全記事へのリンク: [pear]HTTP_Request2のサンプル#1 [pear]HTTP_Request2のサンプル#2 [pear]HTTP_Request2のサンプル#3 [pear]HTTP_Request2のサンプル#4 [pear]HTTP_Request2のサンプル#5 #6 PDF 文章をアップロードする [phpcode] setAuth(“johndoe”, “foo”, HTTP_Request2::AUTH_BASIC); $req->addUpload(“johndoe-txt.pdf”, “/home/johndoe/text.pd

    [php][pear]HTTP_Request2のサンプル#3 | うえちょこ@ぼろぐ
  • HTTP_Request2

    Easy Install Not sure? Get more info. pear install HTTP_Request2 Pyrus Install Try PEAR2's installer, Pyrus. php pyrus.phar install pear/HTTP_Request2 PHP5 rewrite of HTTP_Request package (with parts of HTTP_Client). Provides cleaner API and pluggable Adapters: * Socket adapter, based on old HTTP_Request code, * Curl adapter, wraps around PHP's cURL extension, * Mock adapter, to use for testing pa

    tacchini
    tacchini 2010/04/28
    マニュアル
  • [php][pear]HTTP_Request2のサンプル#1 | うえちょこ@ぼろぐ

    誰もが愛用しているPEAR::HTTP_Requestクラスですが、最近は後継のPEAR::HTTP_Request2クラスがリリースされてちょっと話題になりました。2009/01/21現在、バージョンは0.2.0(alpha)になっています。今後は利用される場面が増えてくると思いますので、HTTP_Requestのマニュアルに載っている全サンプルコードをHTTP_Request2対応で書き換えてみました。ソースコードやAPIリファレンスから推測して書いているので、100%正しいソースコードという保証はできませんが、そこら辺はあなたの技量でカバーしてください(笑。 とはいえ、HTTP_Request2の概要を知らない方も多いと思いますので、まずは0.2.0(alpha)時点でのHTTP_Request2の概要をまとめておきます。 特徴 HTTP_RequestをPHP5対応に書きなおした

    [php][pear]HTTP_Request2のサンプル#1 | うえちょこ@ぼろぐ
    tacchini
    tacchini 2010/04/20
    http_requestのphp5対応の説明
  • HTTP_RequestでProxy Serverを指定する[Pear::HTTP_Request] - bnote

    PearのHTTP_RequestでProxy Serverを指定するには、コンストラクタの第二引数に連想配列で指定するか setProxy関数で指定します。 インスタンス化時に指定するには、次の値をキーとして各設定を指定します。 proxy_host (string) proxy_port (integer) proxy_user (string) proxy_pass (string) <?php require_once "HTTP/Request.php"; $proxy = ('proxy_host'=>'xxx.xxx.xxx.xxx','proxy_port'=>8080); $objHttp = new HTTP_Request("http://www.yahoo.co.jp/",$proxy); if (!PEAR::isError($objHttp->sendReque

  • 1