SearchRecent posts
The Random ToolboxDrupal 7 Setting up variables for use in a template (preprocess and process functions) Rendering Drupal 7 fields (the right way) Linux Secure Copy (scp) command Restrict Free Shipping in Magento Quickbooks Text Connection Ticket Cross-Site Request Forgery (CSRF) jQuery Events: MouseOver / MouseOut vs. MouseEnter / MouseLeave Monthly archive
|
HTTP POST to a REST Service through PHPRepresentational state transfer (REST) is a style of software architecture for distributed systems such as the World Wide Web. The term representational state transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation. Roy Fielding is one of the principal authors of the HTTP (Hypertext Transfer Protocol) specification versions 1.0 and 1.1. <?php $service_url = 'http://contenttestservices/customer-team-service/ppc/cust/'; $curl = curl_init($service_url); $curl_post_data = 'user=bobit'; curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $returnData = curl_exec($curl); print $returnData; ?> |