Login   Register  
PHP Classes
elePHPant
Icontem

File: test_feed.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Md Emran Hasan  >  HTTP client class  >  test_feed.php  >  Download  
File: test_feed.php
Role: Example script
Content type: text/plain
Description: Test file showing fetching of protected feed.
Class: HTTP client class
Access Web resources via HTTP with sockets or Curl
Author: By
Last change:
Date: 2008-01-29 09:07
Size: 396 bytes
 

Contents

Class file image Download
<?php

// Include the Http Class
include_once('class.http.php');

// Instantiate it
$http = new Http();

// Set HTTP basic authentication realms
$http->setAuth('yourusername''yourpassword');

// Get the protected feed
$http->execute('http://www.someblog.com/protected/feed.xml');

// Show result feed or error if occurred
echo ($http->error) ? $http->error $http->result;

?>