PHP Classes

File: api_rest.php

Recommend this page to a friend!
  Classes of Evert Ulises German Soto   cURL Easy and Fast   api_rest.php   Download  
File: api_rest.php
Role: Example script
Content type: text/plain
Description: Example to call an api rest method
Class: cURL Easy and Fast
Send HTTP request to remote servers using Curl
Author: By
Last change:
Date: 8 years ago
Size: 329 bytes
 

Contents

Class file image Download
<?php
require("curl.class.php");

$urlencode = urlencode('evert ulises german soto');

$options = array(
   
"url" => "http://localhost/api_employees/user/1/".$urlencode,
   
"type" => "GET",
   
"return_transfer" => "1"
);

$obj = new wArLeY_cURL($options);
$resp = $obj->Execute();
echo
$obj->getError();

echo
$resp;
?>