Category Archives: php

HTTP Request

서버측 스크립트에서 다른 서버로 HTTP Request 를 해야 하는 경우. Pear package: HTTP_Client (1.1.1) 설치 # pear install HTTP_Client 예제 <?php require_once ‘HTTP/Client.php’; $httpReq =& new HTTP_Client(); $param = array(); $param['name'] = ‘nayoung’; $url = ‘[url]‘; $resCode = $httpReq->post($url, $param); echo $resCode; // response status code $data =& $httpReq->currentResponse(); var_dump($data); ?> 참조: HTTP/1.1: Status Code Definitions
Posted in php | Tagged , | 1436 Comments