Пример #1
0
<?php

require_once dirname(__FILE__) . "/config.php";
require_once dirname(__FILE__) . "/includes/class.twitter.php";
$object = new twitter($nusername);
$tweets = $object->fetch_tweets($tweets_number);
$followers = $object->fetch_followers($followers_number);
// Gets the folder path without filename
function GetFileDir($php_self)
{
    $filename2 = "";
    $filename = explode("/", $php_self);
    for ($i = 0; $i < count($filename) - 1; ++$i) {
        $filename2 .= $filename[$i] . '/';
    }
    return $filename2;
}
$base_url = GetFileDir($_SERVER['PHP_SELF']);
echo <<<EOD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

\t<meta http-equiv="cache-control" content="no-cache">
\t<meta http-equiv="pragma" content="no-cache">
\t<meta http-equiv="expires" content="-1">
\t<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
\t
\t<link type="text/css" rel="stylesheet" media="all" href="{$base_url}/includes/css/twitter.css?v=1.0.3" /> 
\t
</head>