PHP를 이용한 다중 연결 소켓 통신 (1) 이진우 프리랜서 프로그래머 차례 1. 소개 1.1. PHP 컴파일 하기 1.2. PHP의 소켓 함수 2. 소켓 서버 만들기 3. 소켓 클라이언트 만들기 와 실행 4. 결론 이문서의 배포는 자유로우나 최소한 제작자의 정보는 제외하지 않고 배포해 주세요. 문서가 존재하는 모든곳에 답변을 드릴수 없으므로 질문은 홈페이지(http://www.jinoos.com)에서만 받습니다. 1. 소개 앞으로 몇번에 걸처서 PHP를 이용한 다중 연결 소켓 통신에 대해서 알아보겠습니다. PHP는 확장 함수로 socket 계열 함수를 지원합니다. 하지만 이것은 컴파일시 --with-socket 옵션을 주어 컴파일 해야 합니다. 클라이언트 소켓에 관한 함수 fsockopen()는 이곳에..
PHP를 이용한 다중 연결 소켓 통신 (2) 이진우 프리랜서 프로그래머 차례 1. 소개 2. pcntl_fork() 함수 3. PHP 컴파일 하기 4. 프로그램 작성 4.1. 서버 만들기 4.2. 클라이언트 만들기 4.3. 실행하기 5. 결론 이문서의 배포는 자유로우나 최소한 제작자의 정보는 제외하지 않고 배포해 주세요. 문서가 존재하는 모든곳에 답변을 드릴수 없으므로 질문은 홈페이지(http://www.jinoos.com)에서만 받습니다. 1. 소개 이번강좌에는 fork를 이용해서 새로운 프로세스를 생성하여 생성된 자식 서버프로세스가 클라이언트를 담당하는 형태를 구연해 보겠습니다. PHP에서 fork함수로는 Process Control 함수의 pcntl_fork() 함수가 있습니다. Process Co..
cookies array ready for the next request // Note: This currently ignores the cookie path (and time) completely. Time is not important, // but path could possibly lead to security problems. var $persist_referers = true; // For each request, sends path of last request as referer var $debug = false; var $handle_redire..
HttpClient Examples HttpClient Home | Download HttpClient (txt) | HttpClient Manual | HttpClient Demo Grabbing an HTML page (static method)$pageContents = HttpClient::quickGet('http://example.com/'); Posting a form and grabbing the response (static method)$pageContents = HttpClient::quickPost('http://example.com/someForm', array( 'name' => 'Some Name', 'email' => 'email@example.com' )); The stat..
This demo (which may take a few seconds to load) attempts to retrieves the front page of Amazon.com and reports its size in bytes. Debug mode is switched on to show what the script is doing. This demonstrates the script automatically following redirections and maintaining cookies and referrers between sessions.$client = new HttpClient('www.amazon.com'); $client->setDebug(true); if (!$client->get..
Only methods that are intended to be called from outside the script are described. For details of internal methods, Use The Source :) HttpClient($host, $port = 80) Constructor. Takes the web server host (for example, 'scripts.incutio.com') and an optional port. bool get($path, $data = false) Executes a GET request for the specified path. If $data is specified, appends it to a query string as par..
- Total
- Today
- Yesterday