PHP code example of geronimo794 / php-simple-curl-class

1. Go to this page and download the library: Download geronimo794/php-simple-curl-class library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

geronimo794 / php-simple-curl-class example snippets




$my_curl = new Curl();

$my_curl->setUrl('https://api.instagram.com/v1/media/shortcode/BLLZnwjAeEm');

$my_curl->setGetData('access_token', 'abxcsdfsdfasdasd');
$my_curl->setPostData('private_key', 'fgxftfsadfsadsad');

$var_to_send = array(
    'access_token' => 'abxcsdfsdfasdasd',
    'private_key' => 'fgxftfsadfsadsad'
);
$my_curl->setGetData($var_to_send);
$my_curl->setPostData($var_to_send);

$my_curl->setUserAgent('Maybe mozilla');

$curl_respon = $my_curl->getResponse();

$this->load->library('curl');

$this->curl->setUrl('https://api.instagram.com/v1/media/shortcode/BLLZnwjAeEm');

$this->curl->setGetData('access_token', 'abxcsdfsdfasdasd');
$this->curl->setPostData('private_key', 'fgxftfsadfsadsad');

$var_to_send = array(
    'access_token' => 'abxcsdfsdfasdasd',
    'private_key' => 'fgxftfsadfsadsad'
);
$this->curl->setGetData($var_to_send);
$this->curl->setPostData($var_to_send);

$this->curl->setUserAgent('Maybe mozilla');

$curl_respon = $this->curl->getResponse();