Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]
Print
Topic: PHP not working  (Read 378 times)
« on: July 11, 2008, 12:00:05 PM »
scylla Offline
Newbie

View Profile
*
Posts: 19



I'm using rssmini to try to get some content to my site.  Here's a page where it clearly isn't working:
http://nintendo2.t35.com/super-smash-bros-brawl/index.php


  Here's whats in the config.php

Code:
<?php
$title 
"Super Smash Bros Brawl Hub"
// Title of your website

$keyword "super+smash+bros+brawl"
// The keyword that your content will be based on
// For keywords with two or more words, use "+" instead of space
// i.e. "new+york+travel"

$ads "<google>
<script type="
text/javascript"><!--
google_ad_client = "
pub-6991322522351721";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "
120x600_as";
google_ad_type = "
text_image";
google_ad_channel ="";
google_color_border = "
CCCCCC";
google_color_bg = "
CCCCCC";
google_color_link = "
0000FF";
google_color_url = "
0000FF";
google_color_text = "
0000FF";
//--></script>
<script src="
http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</google>";
// Your ads which will be displayed on the pages

$text_color = "black"; 
// The color of text which is displayed

$table_fill = "#2375A4"; 
// The table fill color

$menu_color = "#95CC02"; 
// The menu color
?>

And here's whats in the index.php

Code:
<?php include("config.php"); ?>
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
<?php echo "<title>$title - "?><?php echo basename(__FILE__'.php'); ?></title>
<style type="text/css">
<?php echo 
a:link, a:visited, a:active
{
text-decoration: none;
font-weight: bold;
color: $text_color
}
a:hover
{
text-decoration: underline;
color: $text_color
}
body {
margin: 0px;
font-family: Tahoma;
font-size: 11px;
color: $text_color;
}
p {
font-size: 11px;
color: $text_color;
}
#container {
width: 750px;
border: 1px solid $table_fill;
border-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#banner {
background-color: $table_fill;
color: $menu_color;
font-size: 24px;
font-family: Verdana;
padding-top: 15px;
padding-bottom: 15px;
padding-left: 25px;
border-bottom: 1px outset $table_fill;
text-align: left;
}
#nav {
background-color: $menu_color;
padding-top: 5px;
padding-bottom: 5px;
text-align: left;
border-bottom: 1px solid $table_fill;
}
#nav a {
padding-top: 5px;
padding-bottom: 5px;
background-color: $menu_color;
padding-left: 20px;
padding-right: 20px;
border-right: 1px solid $table_fill;
color: $table_fill;
text-decoration: none;
}
#nav a:hover {
background-color: $table_fill;
color: $menu_color;
border-right: 1px solid $table_fill;
}
#ad {
margin-top: 5px;
margin-bottom: 5px;
}
#content {
margin-left: auto;
margin-right: auto;
width: 750px;
text-align: center;
border-top: 7px solid $table_fill;
padding-top: 3px;
border-bottom: 7px solid $table_fill;
padding-bottom: 3px;
margin-bottom: 5px;
}
#content2 {
width: 750px;
background-color: $menu_color;
text-align: center;
padding-bottom: 5px;
}
#content3 {
background-color: #fff;
width: 740px;
margin-left: auto;
margin-right: auto;
margin-bottom: 4px;
}
#content3 h1 {
background-color: $menu_color;
padding-top: 3px;
padding-bottom: 3px;
font-size: 11px;
color: $table_fill;
margin: 0px;
}
#content4 {
border: 1px solid $table_fill;
margin:0px;
padding-left: 2px;
text-align: left;
padding-bottom: 2px;
}
#footer {
width: 750px;
background-color: $table_fill;
padding-top: 10px;
padding-bottom: 10px;
color: $menu_color;
display: block;
}
#footer a {
color: $menu_color;
}
  </style>"
?>

</head>
<body>
<center>
<div id="container">
<div id="banner"><?php echo "$title"?></div>
<div id="nav"><a href="index.php">Home</a><a href="news.php">News</a><a href="articles.php">Articles</a><a href="photos.php">Photos</a><a href="videos.php">Videos</a><a href="shop.php">Shop</a><a href="links.php">Links</a><a href="http://gameindex.proboards24.com">Forums</a>
</div>
<div id="ad">
<?php echo "$ads"?></div>
<div id="content">
<div id="content2">
<div id="content3">
<h1><?php echo basename(__FILE__'.php'); ?></h1>
<div id="content4">
<p><?php
/*
Created by Global Syndication's RSS Parser
http://www.globalsyndication.com/rss-parser
*/
set_time_limit(0);

$file "http://search.sympatico.msn.ca/news/results.aspx?q=$keyword&format=rss&FORM=RSNR";

$rss_channel = array();
$currently_writing "";
$main "";
$item_counter 0;

function 
startElement($parser$name$attrs) {
   
global $rss_channel$currently_writing$main;
   
switch($name) {
   
case "RSS":
   
case "RDF:RDF":
   
case "ITEMS":
   
$currently_writing "";
   
break;
   
case "CHANNEL":
   
$main "CHANNEL";
   
break;
   
case "IMAGE":
   
$main "IMAGE";
   
$rss_channel["IMAGE"] = array();
   
break;
   
case "ITEM":
   
$main "ITEMS";
   
break;
   
default:
   
$currently_writing $name;
   
break;
   
}
}

function 
endElement($parser$name) {
   
global $rss_channel$currently_writing$item_counter;
   
$currently_writing "";
   
if ($name == "ITEM") {
   
$item_counter++;
   
}
}

function 
characterData($parser$data) {
global $rss_channel$currently_writing$main$item_counter;
if ($currently_writing != "") {
switch($main) {
case "CHANNEL":
if (isset($rss_channel[$currently_writing])) {
$rss_channel[$currently_writing] .= $data;
} else {
$rss_channel[$currently_writing] = $data;
}
break;
case "IMAGE":
if (isset($rss_channel[$main][$currently_writing])) {
$rss_channel[$main][$currently_writing] .= $data;
} else {
$rss_channel[$main][$currently_writing] = $data;
}
break;
case "ITEMS":
if (isset($rss_channel[$main][$item_counter][$currently_writing])) {
$rss_channel[$main][$item_counter][$currently_writing] .= $data;
} else {
$rss_channel[$main][$item_counter][$currently_writing] = $data;
}
break;
}
}
}

$xml_parser xml_parser_create();
xml_set_element_handler($xml_parser"startElement""endElement");
xml_set_character_data_handler($xml_parser"characterData");
if (!(
$fp fopen($file"r"))) {
die("could not open XML input");
}

while (
$data fread($fp4096)) {
if (!xml_parse($xml_parser$datafeof($fp))) {
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
xml_parser_free($xml_parser);


if (isset(
$rss_channel["ITEMS"])) {
if (count($rss_channel["ITEMS"]) > 0) {
for($i 0;$i count($rss_channel["ITEMS"]);$i++) {
if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
print ("\n<div class=\"itemtitle\"><a href=\"" $rss_channel["ITEMS"][$i]["LINK"] . "\">" $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>");
} else {
print ("\n<div class=\"itemtitle\">" $rss_channel["ITEMS"][$i]["TITLE"] . "</div>");
}
 print ("<div class=\"itemdescription\">" $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />");  }
} else {
print ("No News Found");
}
}
?>
</p></div>
</div>
</div>
</div>
<div id="ad">
<?php echo "$ads"?></div>
<div id="footer"><a href="index.php">Home</a>
| <a href="news.php">News</a>
| <a href="articles.php">Articles</a>
| <a href="photos.php">Photos</a>
| <a href="videos.php">Videos</a>
| <a href="shop.php">Shop</a>
| <a href="links.php">Links</a>
| <a href="http://gameindex.proboards24.com">Forums</a>
| <a target="_top" href="http://extremetracking.com/open?login=scylla69">
<img src="http://t1.extreme-dm.com/i.gif" height=38
border=0 width=41 alt="Extreme cheat code tracking for the Unofficial Gamers Network & Gameindex"></a><script language="javascript1.2"><!--
EXs=screen;EXw=EXs.width;navigator.appName!="Netscape"?
EXb=EXs.colorDepth:EXb=EXs.pixelDepth;//-->
</script><script language="javascript"><!--
EXd=document;EXw?"":EXw="na";EXb?"":EXb="na";
EXd.write("<img src=\"http://t0.extreme-dm.com",
"/c.g?tag=scylla69&j=y&srw="+EXw+"&srb="+EXb+"&",
"l="+escape(EXd.referrer)+"\" height=1 width=1>");//-->
</script><noscript><img height=1 width=1 alt="Extreme cheat code tracking for the Unofficial Gamers Network & Gameindex"
src="http://t0.extreme-dm.com/c.g?tag=scylla69&j=n"></noscript>
<br>
</div>
<br>
</body></center>
</html>
Report to moderator   Logged


 
« Reply #1 on: July 12, 2008, 12:07:55 PM »
scylla Offline
Newbie

View Profile
*
Posts: 19



It still isn't working.
Report to moderator   Logged

« Reply #2 on: July 12, 2008, 12:15:21 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,177



Are you getting any kind of error? Keep in mind that php safe mode is on (to prevent abuse) and it might disable some functions (like fopen, etc..).
Report to moderator   Logged

« Reply #3 on: July 12, 2008, 12:25:25 PM »
scylla Offline
Newbie

View Profile
*
Posts: 19



No I just recieve a blank page... and this is all that is on the page that I linked to in the first post:
http://nintendo2.t35.com/super-smash-bros-brawl/index.php

Code:
<!-- T35 Hosting Ad Code Style Begin -->
<style type="text/css">
#t35ad a{
font: 14px  arial,helvetica;
text-decoration: none; }

#t35ad a:hover{
background-color: black;
color: white;
font-size:medium;
font-weight: bold; }
</style>

<!-- T35 Hosting Ad Code Style End --></noscript></noframes>
<!-- T35 Hosting Ad Code Begin -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="20">
<!-- Start of Stat Code -->
<img src="http://c11.statcounter.com/1120767/0/78e6f3a5/0/" width="1" height="1" alt=" " border="0" />
<!-- End of Stat Code -->
</td>
<td><div id="t35ad" align="center" style="display:block;">

<a target="_blank" href="http://www.latestcasinobonuses.com/nodepositcasinobonus.html">Free Casinos</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a target="_blank" href="http://www.blogifer.com/">Busby Seo Challenge </a>&nbsp;&nbsp;|&nbsp;&nbsp;<a target="_blank" href="http://www.casinolistings.com/">Casino Review</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a target="_blank" href="http://www.drugrehabcenter.com/">Drug Rehab</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a target="_blank" href="http://www.onlinecasinos.cc/">Online Casinos</a>
</div></td>
<td width="20"><a target="_blank" href="http://www.t35.com">
<img border="0" src="http://freehostcp.t35.com/t35.gif" width="20" height="20" alt="Free Web Hosting" align="right" /></a></td>
</tr>

</table>
<!-- T35 Hosting Ad Code End -->
Report to moderator   Logged

« Reply #4 on: July 12, 2008, 01:19:44 PM »
T35 Head Forum Administrator
dWhite Offline
Administrator
Sr. Member

View Profile WWW
*****
Posts: 330



If you are getting a blank page, it might be the fact that our restriction on PHP functions that the script is trying to use are disabled.
Report to moderator   Logged

 
Pages: [1]
Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC