![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| avb Fri May 18 10:33:31 2007 UTC Modified files: /pear/HTTP_Request/Request Listener.php /pear/HTTP_Request/docs download-progress.php example.php Log: proper header comment block, @ignore package examples http://cvs.php.net/viewvc.cgi/pear/H...&diff_format=u Index: pear/HTTP_Request/Request/Listener.php diff -u pear/HTTP_Request/Request/Listener.php:1.2 pear/HTTP_Request/Request/Listener.php:1.3 --- pear/HTTP_Request/Request/Listener.php:1.2 Sun Oct 26 10:28:29 2003 +++ pear/HTTP_Request/Request/Listener.php Fri May 18 10:33:31 2007 @@ -1,48 +1,58 @@ <?php -// +-----------------------------------------------------------------------+ -// | Copyright (c) 2002-2003, Richard Heyes | -// | All rights reserved. | -// | | -// | Redistribution and use in source and binary forms, with or without | -// | modification, are permitted provided that the following conditions | -// | are met: | -// | | -// | o Redistributions of source code must retain the above copyright | -// | notice, this list of conditions and the following disclaimer. | -// | o Redistributions in binary form must reproduce the above copyright | -// | notice, this list of conditions and the following disclaimer in the | -// | documentation and/or other materials provided with the distribution.| -// | o The names of the authors may not be used to endorse or promote | -// | products derived from this software without specific prior written | -// | permission. | -// | | -// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | -// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | -// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | -// | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | -// | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | -// | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | -// | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | -// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | -// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | -// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | -// | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | -// | | -// +-----------------------------------------------------------------------+ -// | Author: Alexey Borzov <avb@php.net> | -// +-----------------------------------------------------------------------+ -// -// $Id: Listener.php,v 1.2 2003/10/26 10:28:29 avb Exp $ -// +/** + * Listener for HTTP_Request and HTTP_Response objects + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Copyright (c) 2002-2007, Richard Heyes + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * o The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @category HTTP + * @package HTTP_Request + * @author Alexey Borzov <avb@php.net> + * @copyright 2002-2007 Richard Heyes + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Listener.php,v 1.3 2007/05/18 10:33:31 avb Exp $ + * @link http://pear.php.net/package/HTTP_Request/ + */ /** + * Listener for HTTP_Request and HTTP_Response objects + * * This class implements the Observer part of a Subject-Observer - * design pattern. It listens to the events sent by a - * HTTP_Request or HTTP_Response instance. + * design pattern. * - * @package HTTP_Request - * @author Alexey Borzov <avb@php.net> - * @version $Revision: 1.2 $ + * @category HTTP + * @package HTTP_Request + * @author Alexey Borzov <avb@php.net> + * @version Release: @package_version@ */ class HTTP_Request_Listener { http://cvs.php.net/viewvc.cgi/pear/H...&diff_format=u Index: pear/HTTP_Request/docs/download-progress.php diff -u pear/HTTP_Request/docs/download-progress.php:1.1 pear/HTTP_Request/docs/download-progress.php:1.2 --- pear/HTTP_Request/docs/download-progress.php:1.1 Mon Oct 27 10:48:49 2003 +++ pear/HTTP_Request/docs/download-progress.php Fri May 18 10:33:31 2007 @@ -7,7 +7,8 @@ * 1) The file should be run in console, not in browser; * 2) You should turn output buffering OFF for this to work properly. * - * $Id: download-progress.php,v 1.1 2003/10/27 10:48:49 avb Exp $ + * @version CVS: $Id: download-progress.php,v 1.2 2007/05/18 10:33:31 avb Exp $ + * @ignore */ require_once 'HTTP/Request.php'; http://cvs.php.net/viewvc.cgi/pear/H...&diff_format=u Index: pear/HTTP_Request/docs/example.php diff -u pear/HTTP_Request/docs/example.php:1.5 pear/HTTP_Request/docs/example.php:1.6 --- pear/HTTP_Request/docs/example.php:1.5 Thu Jan 30 14:23:13 2003 +++ pear/HTTP_Request/docs/example.php Fri May 18 10:33:31 2007 @@ -34,23 +34,26 @@ /** -* This will grab a webpage and display it -*/ - include('HTTP/Request.php'); + * This will grab a webpage and display it + * + * @version CVS: $Id: example.php,v 1.6 2007/05/18 10:33:31 avb Exp $ + * @ignore + */ +include('HTTP/Request.php'); - $req = &new HTTP_Request('http://www.php.net'); - $req->setMethod(HTTP_REQUEST_METHOD_POST); - $req->addPostData('Foo', 'bar'); - $req->sendRequest(); - $response1 = $req->getResponseBody(); - - $req->setMethod(HTTP_REQUEST_METHOD_GET); - $req->setURL('http://pear.php.net'); - $req->clearPostData(); - $req->sendRequest(); +$req = &new HTTP_Request('http://www.php.net'); +$req->setMethod(HTTP_REQUEST_METHOD_POST); +$req->addPostData('Foo', 'bar'); +$req->sendRequest(); +$response1 = $req->getResponseBody(); - $response2 = $req->getResponseBody(); +$req->setMethod(HTTP_REQUEST_METHOD_GET); +$req->setURL('http://pear.php.net'); +$req->clearPostData(); +$req->sendRequest(); - echo $response1; - echo $response2; +$response2 = $req->getResponseBody(); + +echo $response1; +echo $response2; ?> \ No newline at end of file | |||
| Featured Websites | ||||
|
![]() |
| Tags: cvs, downloadprogressphp, examplephp, http_requestdocs, http_requestrequest, listenerphp, pear |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cvs: pear /HTTP_Request Request.php | Alexey Borzov | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear /PHP_CodeSniffer CodeSniffer.php package.xml /PHP_CodeSniffer/CodeSniffer/DocGenerators Generator.php Text.php /PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions ValidClassNameStandard.xml ValidFunctionNameStandard.xml /P | Greg Sherwood | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear /PEAR_Frontend_Web package.xml pearweb.php /PEAR_Frontend_Web/Frontend Web.php /PEAR_Frontend_Web/docs example.php index.php.txt | Pear | 0 | 05-20-2007 7:42 PM | |
| [PEAR-ACCOUNT-REQUEST] Your bug tracker account request | johannes graën | Pear | 0 | 05-20-2007 7:41 PM |
| [ANNOUNCEMENT] HTTP_Request-1.4.1 (stable) Released. | PEAR Announce | Pear | 0 | 05-20-2007 6:34 PM |
| Featured Websites | ||||
|