News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Giorgio Sironi's Blog:
HTTP verbs in PHP
April 08, 2010 @ 10:04:29

In a recent post to his blog Giorgio Sironi takes a look at HTTP "verbs" and their handling in PHP, both on the incoming and outgoing sides.

While PHP is capable of performing HTTP requests towards external servers with any method, either via the HTTP extension or by opening streams directly, the support of the various GET, POST, PUT and other verbs on the receiving side of HTTP requests is a bit more complicated.

He notes that the "more interesting" ones are defined in the HTTP 1.1 spec and, unfortunately, those are ones not natively supported by PHP (like POST and GET are). He recommends a workaround for the problem so you can still work with data that clients PUT or DELETE - using a fopen call to the "php://input" stream on the connection and pulling in the raw data. Not idea, but definitely functional.

0 comments voice your opinion now!
http verb rest tutorial


blog comments powered by Disqus

Similar Posts

Lorenzo Alberton's Blog: PEAR::Pager Tutorials

Web Development Blog: Tutorial: FTP Upload via cURL

Ivan Iordanov's Blog: extending Zend_Db_Table to create NestedSet models

Padraic Brady's Blog: PHP Mutation Testing With MutateMe

Alison Gianotto: Check User-Submitted URLs for Malware and Phishing in Your Application


Community Events

Don't see your event here?
Let us know!


example configure application conference release library laravel series symfony2 composer interview framework podcast performance api introduction voicesoftheelephpant php7 community opinion

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework