Hi, Hows it going? I need help with a fail code.. Here's the situation:
In my index.php file, I have a include("home.html"); code going.
Then in my index.html I have another include:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Site Name</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#eeeeee">
<center>--------------------<b>Family Feeds:</b>--------------------</center><p>
<?php include("http://www.winterhaventhecommunity.com/modules.php?name=InterviewStream&pa=list_pages_categories&cid=1"); ?>
</body>
</html>
This include is for a news/content feed that we have set up.. The problem is, a few times now, his site has crashed, and that left my site with a lot of WARNINGS on my index.php.. They made it look horrible and distorted.
If anyone can take the time to change this code around for me so that if the include file on his site doesnt work, then it will say something like "Problems with the feed right now".. That would be so cool..
Thanks for any time..
Peace.
madman Support Mod
Joined: Feb 15, 2004
Posts: 806
Posted:
Fri Oct 22, 2004 10:23 am
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Site Name</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#eeeeee">
<center>--------------------<b>Family Feeds:</b>--------------------</center><p>
<?php
ob_start();
@include_once("http://www.winterhaventhecommunity.com/modules.php?name=InterviewStream&pa=list_pages_categories&cid=1");
$page_content = ob_get_contents();
ob_end_clean();
if (($page_content != '') && !preg_match('/warning\:/i', $page_content))
{
echo $page_content;
}
else
{
echo 'Problems with the feed right now';
}
?>
</body>
</html>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum