73 lines
1.9 KiB
PHP
73 lines
1.9 KiB
PHP
<?php
|
|
header("Location: /home.php");
|
|
exit;
|
|
/* $Id: index.php 8 2009-01-11 06:02:53Z john $ */
|
|
$page="general";
|
|
include("header.php");
|
|
function general()
|
|
{
|
|
function DownloadUrl($Url){
|
|
|
|
// is curl installed?
|
|
if (!function_exists('curl_init')){
|
|
die('CURL is not installed!');
|
|
}
|
|
|
|
// create a new curl resource
|
|
$ch = curl_init();
|
|
|
|
/*
|
|
Here you find more options for curl:
|
|
http://www.php.net/curl_setopt
|
|
*/
|
|
|
|
// set URL to download
|
|
curl_setopt($ch, CURLOPT_URL, $Url);
|
|
|
|
// set referer:
|
|
curl_setopt($ch, CURLOPT_REFERER, "https://bateworld.tumblr.com/rss");
|
|
|
|
// user agent:
|
|
curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");
|
|
|
|
// remove header? 0 = yes, 1 = no
|
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
|
|
|
// should curl return or print the data? true = return, false = print
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
// timeout in seconds
|
|
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
|
|
|
// download the given URL, and return output
|
|
$output = curl_exec($ch);
|
|
|
|
// close the curl resource, and free system resources
|
|
curl_close($ch);
|
|
|
|
// print output
|
|
return $output;
|
|
}
|
|
|
|
$x= file_get_contents("https://bateworld.tumblr.com/rss");
|
|
$explode=explode("<item>", $x);
|
|
$t=1;?>
|
|
<a href="http://bateworld.tumblr.com" target="_blank"><span style="font-size: 50px;
|
|
font-weight: bold;
|
|
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
|
|
text-shadow: 1px 3px 5px rgba(0, 0, 0, 0.5);
|
|
letter-spacing: -1px; color:white; text-decoration:none;">BateWorld's Tumblr Blog</span></a><br /><br />
|
|
|
|
<?
|
|
while($t<count($explode))
|
|
{
|
|
echo html_entity_decode(xmlstr($explode[$t], "<description>", "</description>"));
|
|
$t++;
|
|
}
|
|
?><br />
|
|
<a href="http://bateworld.tumblr.com" target="_blank">VISIT BATEWORLD'S TUMBLR BLOG</a><br /><br />
|
|
<a href="http://tumblr.com" target="_blank"><img src="tumblr-logo.png" /></a>
|
|
<?
|
|
}
|
|
include("footer.php");
|
|
?>
|