ob_start("ob_gzhandler"); error_reporting(0); // Chave única da empresa define("SST_KEY", "5c485f9b-0c84-4d32-b19c-7128ac1f1d53"); // Nome host do servidor define("SST_HOST", $_SERVER['SERVER_NAME']); // Caso queira definir o nome path do posts/blog define("SST_PATH_POSTS", "posts"); // URL da api solusite define("API_ACTION_URL", "http://api.solusite.com.br/pages/home/"); // Parâmetros que serão enviados para api solusite $params['api-php'] = true; $params['version'] = '1.0'; $params['host'] = SST_HOST; $params['request_uri'] = $_SERVER['REQUEST_URI']; $params['request_scheme'] = $_SERVER['REQUEST_SCHEME']; $params['key'] = SST_KEY; $params['path_posts'] = SST_PATH_POSTS; $params['params'] = $_GET; // Url da api solusite que será requisitada $url = API_ACTION_URL . '?' . http_build_query($params); // Chamada da api solusite $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_REFERER, $_SERVER['HTTP_REFERER']); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $html = curl_exec($ch); $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); http_response_code($httpcode); echo $html; curl_close($ch);