Sign In/My Account | View Cart  
advertisement

Article:
 Creating and Consuming Web Services With PHP
Subject: How to handle DELETE using PHP REST
Date: 2004-10-04 01:11:23
From: Stormpixel

The work is primarily done by your PHP server. You have to retrieve the method from the header, then execute the task you want.


For example, let's say your REST service adds and deletes records from a database. The server must first look at the header, if it has a DELETE method it would look for a parameter (let's say a ROWID) in the querystring of the URL and delete the corresponding ROWID in your database.


As I've outlined in the article, REST is effective and based on web standards. However, the onus is on the developer to build the guts of the service from scratch using the HTTP specs. That's why you couldn't find anything in the PHP docs.


Hope this information helps.


Thanks,
Jean-Luc David
http://www.stormpixel.com


--- Original Message ---
since the REST idea is to optimize the usage of HTTP methods (GET,PUT,DELETE,POST,etc). how do we handle DELETE, PUT or OPTION in php? I just couldn't find the way to handle DELETE in php4 doc.


Previous Message Previous Message   Next Message Next Message


Sponsored By: