| 
<?php
/**
 * Example of META-tags fetching with mtfetcher classes
 */
 require_once 'mtfetcher/mtfetcher_Fetcher.php';
 
 $f = new mtfetcher_Fetcher;
 
 // Selecting transport
 
 //$trName = 'fgc'; // Fetch using 'file_get_contents' PHP-function
 //$trName = 'file'; // Fetch using 'file' PHP-function. Simplest way to run.
 $trName = 'PEAR_Request'; // Fetch using PEAR::HTTP_Request class
 $trConf = array(); // Configuration of transport. Use this array if you need to configure proxy access and so on
 
 $err = $f->selectTransport($trName,$trConf);
 if (PEAR::isError($err)) showError($err);
 
 // Fetching tags
 $url = "http://www.tortuga.pp.ru/index.php/processor/index/lang/en";
 $tags = $f->getTags($url);
 if (PEAR::isError($tags)) showError($tags);
 print_r($tags);
 
 function showError($err) {
 die("Error '".$err->getMessage()."' (".get_class($err).")");
 }
 ?>
 |