Possible Duplicate:
PHP HTTP-Request
I want to use a PHP Core class in my Yii Application. However, Yii automatically tries to import the class name as a file.
How do I use a PHP core class in Yii WITHOUT it trying to import a file?
EDIT: (Add code)
$r = new HttpRequest('http://example.com/feed.rss', HttpRequest::METH_GET);
$r->setOptions(array('lastmodified' => filemtime('local.rss')));
$r->addQueryData(array('category' => 3));
try {
$r->send();
if ($r->getResponseCode() == 200) {
file_put_contents('local.rss', $r->getResponseBody());
}
} catch (HttpException $ex) {
echo $ex;
}