Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hello,
I am not developer actually, I got script and it used to be run properly as it show http://www.nysetechnical.com and http://www.cbzale.com
I upload the same script to server for other domains, but there are errors:
Quote:
Warning: MagpieRSS: Failed to parse RSS file. (syntax error at line 2, column 62) in /home/asia/public_html/cpatricks/magpierss/rss_fetch.inc on line 238
Warning: Invalid argument supplied for foreach() in /home/asia/public_html/cpatricks/index.php on line 122
I don't know what's wrong, could you please kindly advise me exactly and deeply what's line I have to change the code and which code I have to replace it?
thanks in advanced
FYI
this is index.php
Quote:Code: Select all
<?php
$myhost = $_SERVER["SERVER_NAME"];
if(!$_SERVER["QUERY_STRING"]) {
// exit();
include ("index.inc");
exit();
}
//$keywords = $_SERVER["QUERY_STRING"];
$keyword = $_SERVER["QUERY_STRING"];
$keyword = str_replace("-", " ", $keyword);
$keyword = str_replace("+", " ", $keyword);
$keyword = str_replace("_", " ", $keyword);
//$worldfind4 = "-";
//$worldreplace4 = " ";
//$search = str_replace($worldfind4, $worldreplace4, $search);
//$worldfind1 = "-";
//$worldreplace1 = " ";
//$search = str_replace($worldfind1, $worldreplace1, $search);
?>
<html>
<head>
<meta name="description" content="<?php echo $keyword; ?>">
<meta name="keywords" content="<?php echo $keyword; ?>">
<META name="verify-v1" content="wEuqAEomxrj6cklo08Mptnn7f0vLgtU/w1IhqpmD4BA=" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-us">
<title><?php echo $keyword; ?> | <?php echo $_SERVER["HTTP_HOST"]; ?></title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#3300cc" vlink="#660066" alink="#FF0000">
<p>
<center>
<table border=0 bgcolor="#669933" cellpadding=3 cellspacing=0 width=600><tr><td valign=middle align=left>
</td>
<td align=right valign=middle>
</td></tr>
<tr><td bgcolor="#cccccc" align=right colspan=2>
<font face="Arial"><a href="http://<? echo $_SERVER["SERVER_NAME"]; ?>/"><? echo $_SERVER["SERVER_NAME"]; ?></a></font>
</td></tr></table>
<p>
<FORM accept-charset="UTF-8" action="http://<? echo $_SERVER["SERVER_NAME"]; ?>/search.php" method="GET">
<input size=30 name=search>
<input type=submit value="Search">
<a href="http://<? echo $_SERVER["SERVER_NAME"]; ?>/advanced.htm"><small><i>advanced</i></small></a>
</form>
<p>
<div align="center">
<table border="0" id="table1" cellspacing="0" cellpadding="0" width=600>
<tr>
<td width=600>
<?php include ("adsense.inc"); ?>
<font face="Arial">
<?php
$keywords = $_SERVER["QUERY_STRING"];
$keywords = stripslashes ( $_SERVER["QUERY_STRING"] );
$keywords = preg_replace('~^(\s*)(.*?)(\s*)$~m', "\\2", $keywords);
$keywords = ereg_replace("[^[] ]","",$keywords);
$keywords = preg_replace('/\s\s+/', ' ', $keywords);
if ($keywords == ""){$keywords = "untitled";}
//$keywords = str_replace(" ", "+", $keywords);
$keywords = str_replace(" ", "-", $keywords);
//$keywords = str_replace("|", "", $keywords);
//$keywords = trim($keywords);
//$keywords = str_replace($worldfind3, $worldreplace3, $keywords);
define('MAGPIE_DIR', './magpierss/');
//define('MAGPIE_CACHE_DIR', './magpierss/cache');
//define('MAGPIE_CACHE_DIR', '/tmp/www.unlimitedseek.info');
define('MAGPIE_CACHE_DIR', './magpierss/cache');
define('MAGPIE_CACHE_ON', 1);
require_once(MAGPIE_DIR.'rss_fetch.inc');
error_reporting(E_ERROR);
//$url = "http://rwsm.directtaps.net/p5/rss.aspx?query=$keywords";
//$url = "http://blogsearch.google.com/blogsearch_feeds?hl=en&ie=utf-8&num=100&output=rss&q=$keywords";
//http://blogsearch.google.com/blogsearch_feeds?hl=en&q=make+money+adsense&ie=utf-8&num=100&output=rss
//$url = "http://blogsearch.google.com/blogsearch_feeds?hl=en&ie=utf-8&num=100&output=rss&q=$keywords";
//http://search.blogger.com/blogsearch_feeds?q=earn+money+cash&hl=en&ui=blg&ie=utf-8&num=100&output=rss
//$url = "http://rwsm.directtaps.net/p5/rss.aspx?query=$keywords";
//$file = "http://rssfeedsgenerator.com/services/clickbank.php?c=0&a=iamnewbies&q=$kkeywordss";
$url = "http://rssfeedsgenerator.com/services/clickbank.php?c=0&a=iamnewbies&q=$keywords";
if ( $url ) {
$rss = fetch_rss( $url );
// echo "Channel: " . $rss->channel['title'] . "<p>";
if ( $rss ) {
echo "<ul>";
$ii= 0;
foreach ($rss->items as $item) {
if($ii++ >= 20) break;
$href = $item['link'];
$title = $item['title'];
$titlesearch = strip_tags ( $title );
$titlesearch = stripslashes ( $titlesearch );
$titlesearch = preg_replace('~^(\s*)(.*?)(\s*)$~m', "\\2", $titlesearch);
$titlesearch = ereg_replace("[^[] ]","",$titlesearch);
$titlesearch = preg_replace('/\s\s+/', ' ', $titlesearch);
if ($titlesearch == ""){$titlesearch = "untitled";}
// $titlesearch = str_replace(" ", "-", $titlesearch);
$keysearch = explode (" ", $titlesearch);
// $newkeyword = $keysearch[0]."-".$keysearch[1]."-".$keysearch[2];
// $newkeyword = $keysearch[0]."-".$keysearch[1];
$newkeyword = $keysearch[0];
$description = $item['description'];
// echo "<li> $image<a href=$href>$title</a> <br> $description </li>";
// echo "<li> $image<a href=?$newkeyword>$title</a> <br> $description ";
echo "<li> $image<a href=$href><b>$title</b></a> <br> $description <br>";
echo "<font size='2' face='sans-serif, Arial, Helvetica'><b>Related:</b> ";
for ($i=0; $i<count($keysearch); $i++) {
// echo "• <A HREF='http://" .$_SERVER["SERVER_NAME"]. "/?" . $keysearch[$i] . "'>" . $keysearch[$i] . "</A> \n";
echo "• <A HREF='http://" .$_SERVER["SERVER_NAME"]. "/" . $keysearch[$i] . ".htm'>" . $keysearch[$i] . "</A> \n";
}
echo "</li><br><br>\n";
}
echo "</ul>";
}
}
else {
echo "An error occured! " .
"Consider donating more $$$ for restoration of services." .
"<br>Error Message: ";
}
?>
</font>
</td>
</tr>
</table>
</td></tr></table>
</div>
<table border=0 cellpadding=0 cellspacing=0 width=600><tr><td align=left valign=bottom>
</td><td align=right valign=bottom>
</td></tr></table>
<table border=0 bgcolor="#669933" cellpadding=2 cellspacing=0 width=600><tr><td valign=middle>
<font color="#ffffff" face="sans-serif, Arial, Helvetica" size="-2">
Copyright © 2006 <? echo $_SERVER["SERVER_NAME"]; ?> . All rights reserved.
</font>
</td></tr></table><font size="-2"><br></font>
<font color="#666666" face="sans-serif, Arial, Helvetica" size="-1"><br>
</font>
</center>
<div align="center"><font face="Arial"><a href="http://<? echo $_SERVER["SERVER_NAME"]; ?>/">
<? echo $_SERVER["SERVER_NAME"]; ?></a> </font></div>
<?php include ("stats.inc"); ?>
</body>
</html>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]