Ejemplo n.º 1
0
        $ch = curl_init();
        $timeout = 0;
        // set to zero for no timeout
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer {$this->token}"));
        $results = curl_exec($ch);
        curl_close($ch);
        // display file
        return json_decode($results);
    }
}
// end EnvatoAPI;
$api = new EnvatoAPI();
var_dump($api->getResults($_POST));
// Get our class file
require "app.php";
$app = new WhatPress();
?>
<!DOCTYPE html>
<html lang="en" class="no-js">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    
    <title><?php 
echo $app->name;
?>
 - <?php