Login   Register  
PHP Classes
elePHPant
Icontem

File: RCexample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Eugene Panin  >  Remote Content retriever  >  RCexample.php  >  Download  
File: RCexample.php
Role: ???
Content type: text/plain
Description: Usage example
Class: Remote Content retriever
Author: By
Last change:
Date: 2001-01-10 05:23
Size: 544 bytes
 

Contents

Class file image Download
<?
 require './SimpleObject.php';
 require './RemoteContent.php';

 // Getting remote page
 $rc = new RemoteContent('http://www.mysite.com');
 $data = $rc->getData();
 if ($rc->getError()) {
        echo "Error while retrieving remote content: ".$rc->getError();
        exit;
 }
 echo $data."<hr>";

 // Getting local file
 $rc = new RemoteContent('/path/to/your/file');
 $data = $rc->getData();
 if ($rc->getError()) {
        echo "Error while retrieving local file: ".$rc->getError();
        exit;
 }
 echo $data;

?>