<?php
include('./curl.wrapper.php');
$curl = new CCurlWrapper();
if($curl->InitEx() === false)
die('Unable to init the CURL library' . "\n");
// cache per month (the folder SHOULD have been created first)
$curl->EnableCache(true, CACHE_MONTH, './cache');
// define the port (useless until it 80 but for the example...)
$curl->SetPort(80);
// the result of the request is displayed in the console if the '-v' param is supplied...
$curl->SetReturnTransfer(!in_array('-v', $argv));
// request
$curl->Exec('http://fr.wikipedia.org/wiki/User-Agent');
?>
|