Skip to content

kunz398/API-custom-Function-for-php-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

in order to use this include the curl.php file in your project and then all you have to do is require the file Example: index.php

require_once  "Curl.php";
$url = 'http://URLOF/API/callme';

Making a POST API Call

$params = array(
'param_1' => 'ONE'
'param_2' => ' TWO',
);

$output = Curl::httpPost($url, "POST", $params);
var_dump($output);

Making a GET API Call

  $params = array(
    'param_1' => 'ONE'
    'param_2' => ' TWO',
    );
    
  $output = Curl::httpPost($url, "POST", $params);
  var_dump($output);

About

Singleton Class for making API Call

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages