Server IP : 127.0.0.2 / Your IP : 3.148.223.53 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/vendor/guzzlehttp/guzzle/ |
Upload File : |
Guzzle, PHP HTTP client and webservice framework ================================================ [](http://travis-ci.org/guzzle/guzzle) Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services. - Manages things like persistent connections, represents query strings as collections, simplifies sending streaming POST requests with fields and files, and abstracts away the underlying HTTP transport layer. - Can send both synchronous and asynchronous requests using the same interface without requiring a dependency on a specific event loop. - Pluggable HTTP adapters allows Guzzle to integrate with any method you choose for sending HTTP requests over the wire (e.g., cURL, sockets, PHP's stream wrapper, non-blocking event loops like ReactPHP. - Guzzle makes it so that you no longer need to fool around with cURL options, stream contexts, or sockets. ```php $client = new GuzzleHttp\Client(); $response = $client->get('http://guzzlephp.org'); $res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]); echo $res->getStatusCode(); // "200" echo $res->getHeader('content-type'); // 'application/json; charset=utf8' echo $res->getBody(); // {"type":"User"...' var_export($res->json()); // Outputs the JSON decoded data // Send an asynchronous request. $req = $client->createRequest('GET', 'http://httpbin.org', ['future' => true]); $client->send($req)->then(function ($response) { echo 'I completed! ' . $response; }); ``` Get more information and answers with the [Documentation](http://guzzlephp.org/), [Forums](https://groups.google.com/forum/?hl=en#!forum/guzzle), and [Gitter](https://gitter.im/guzzle/guzzle). ### Installing via Composer The recommended way to install Guzzle is through [Composer](http://getcomposer.org). ```bash # Install Composer curl -sS https://getcomposer.org/installer | php ``` Next, run the Composer command to install the latest stable version of Guzzle: ```bash composer.phar require guzzlehttp/guzzle ``` After installing, you need to require Composer's autoloader: ```php require 'vendor/autoload.php'; ``` ### Documentation More information can be found in the online documentation at http://guzzlephp.org/.