HTTPRelay
[ class tree: HTTPRelay ] [ index: HTTPRelay ] [ all elements ]

Procedural File: HTTPRelay.php

Source Location: /HTTPRelay/HTTPRelay.php



Classes:

HTTPRelay
HTTPRelay 패키지는 HTTP 요청을 간단하게 하거나 또는 HTTP 요청을 다른 서버로 Relay를 하기 위한 기능을 제공한다.


Page Details:

Project: HTTPRelay :: HTTP Relay class
File: HTTPRelay.php

HTTPRelay 패키지는 HTTP 요청을 간단하게 하거나 또는 HTTP 요청을 다른 서버로 Relay를 하기 위한 기능을 제공한다.

예제:

  1. <?php
  2. /*
  3.  * Test code for HTTPRelay
  4.  * $Id$
  5.  */
  6.  
  7. $iniget function_exists ('___ini_get''___ini_get' 'ini_get';
  8. $iniset function_exists ('___ini_set''___ini_set' 'ini_set';
  9.  
  10. $cwd getcwd ();
  11. $ccwd basename ($cwd);
  12. if $ccwd == 'tests' {
  13.     $oldpath $iniget ('include_path');
  14.     $newpath preg_replace ("!/{$ccwd}!"''$cwd);
  15.     $iniset ('include_path'$newpath ':' $oldpath);
  16. }
  17.  
  18. require_once 'HTTPRelay.php';
  19.  
  20. try {
  21.     $http new HTTPRelay;
  22.  
  23.     $buf $http->fetch ('https://raw.github.com/twbs/bootstrap/master/bower.json'3);
  24.  
  25.     if $buf === false {
  26.         echo 'ERROR:  ' $http->error "\n";
  27.         exit;
  28.     }
  29.  
  30.     $buf json_decode ($buf);
  31.  
  32.     print_r ($buf);
  33.     print_r ($http->info);
  34. catch myException $e {
  35.     echo $e->Message ("\n";
  36.     print_r ($e->TraceAsArray ()) "\n";
  37.     $e->finalize ();
  38. }
  39.  
  40. /*
  41.  * Local variables:
  42.  * tab-width: 4
  43.  * c-basic-offset: 4
  44.  * End:
  45.  * vim: set filetype=php noet sw=4 ts=4 fdm=marker:
  46.  * vim600: noet sw=4 ts=4 fdm=marker
  47.  * vim<600: noet sw=4 ts=4
  48.  */
  49. ?>




Tags:

author:  JoungKyun.Kim <http://oops.org>
copyright:  (c) 2018, OOPS.org
link:  http://pear.oops.org/package/HTTPRelay
since:  File available since release 0.0.1
filesource:  Source Code for this file
license:  BSD


Includes:

require_once(myException.php) [line 25]
import myException API







HTTPRelay_REQUIRES [line 617]

void HTTPRelay_REQUIRES( )

HTTRelay 패키지에서 필요한 의존성을 검사한다.



Tags:

access:  public


[ Top ]



Documentation generated on Tue, 14 May 2019 02:00:05 +0900 by phpDocumentor 1.4.4