php ini_set display_errors true error_reporting E_ALL include libs cur

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?php
ini_set('display_errors', true);
error_reporting(E_ALL);
include 'libs/curl/pi_curl_exception.php';
include 'libs/curl/pi_curl.php';
$cURL = new Pi_Curl;
$cURL->setDefaultOptions();
$cURL->setOption('URL', 'http://yandex.ru/');
$cURL->setOption('TIMEOUT', 10);
$cURL->applyOptions();
$result = curl_exec($cURL->getHandle());