Hi ...
I am not sure if this is the rite place to post this but if its not sorry
i am new here and need help with my cricket scores script now the code works well i just cant get the next or prev to work
so when i click next it stays on the same page with the same items this is my code
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';
?>
<div class="hd2"><center><font face="Verdana" size="3"><b>Daily Cricket News</b></font></center></div>
<?php
extract($_REQUEST);
$feed = "http://content-www.cricinfo.com/rss/content/feeds/news/0.xml";
$fp = @fopen($feed,"r");
if(!$fp)
{
echo"Cannot Connect to read info<br/>";
echo"Try Again Later <br/>";
} else
{
while(!feof($fp)) $raw .= @fgets($fp, 4096);
fclose($fp);
if( eregi("<item>(.*)</item>", $raw, $rawitems ) ) {
$items = explode("<item>", $rawitems[0]);
$m4u_items_per_page = 5;
if ($m4u == "")$m4u = "1";
$countfile= count($items);
$countfile=$countfile-2;
$first=($m4u*$m4u_items_per_page)-$m4u_items_per_page;
$m4u_pages = ceil($countfile / $m4u_items_per_page);
$next_arrays=($first+($m4u_items_per_page-1));
if($next_arrays>$countfile)$next_arrays=$countfile;
for ($i=($first); $i <= $next_arrays; $i++) {
eregi("<title>(.*)</title>",$items[$i+1], $title );
eregi("<link>(.*)</link>",$items[$i+1], $url );
eregi("<description>(.*)</description>",$items[$i+1], $description);
eregi("<pubDate>(.*)</pubDate>",$items[$i+1], $pubDate);
$url[1] = str_replace("<![CDATA[", "", $url[1]);
$url[1] = str_replace("]]>", "", $url[1]);
$url[1] = str_replace("<![CDATA[", "", $url[1]);
$title[1] = str_replace("'", "", $title[1]);
$title[1] = str_replace("&", "&", $title[1]);
$title[1] = str_replace("<", "<", $title[1]);
$title[1] = str_replace(">", ">", $title[1]);
$title[1] = str_replace("<![CDATA[", "", $title[1]);
$title[1] = str_replace("]]>", "", $title[1]);
$description[1] = str_replace("&", "&", $description[1]);
$description[1] = str_replace("<", "<", $description[1]);
$description[1] = str_replace(">", ">", $description[1]);
$description[1] = str_replace("'", "'", $description[1]);
$description[1] = str_replace("<![CDATA[", "", $description[1]);
$description[1] = str_replace("]]>", "", $description[1]);
echo '<font face="Verdana" size="2"><u><b> '.$title[1].'</font></u></b>
';
echo '<font face="Verdana" size="2">'.$description[1].'</font>
';
}
}
}
if ($m4u_pages>1) {
echo "<hr/>";
echo "Page {$m4u} of {$m4u_pages}<br/>";
}
if ($m4u <= $m4u_pages and $m4u>1) $m4u_prew = '<a href="news.php?npage='.($m4u-1).'"><- prev<br/></a> ';
if ($m4u_pages > 1 and $m4u<$m4u_pages) $m4u_next = ' <a href="news.php?npage='.($m4u+1).'">next -></a>';
if ($m4u_pages>1) {
echo "<b>".$m4u_prew.$m4u_next."</b><br/>";
}
?>
<div class="menu">
</div>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="index.php?cmd=100">Back</b></font></a>
</td></tr>
</table>
<hr>
<?php include 'Include/Footer.php'; Log_Hit("CricketNews"); ?>
PHP & Images [Resize, Crop, Save]
Hey! Well I have a little dilema, hoping I could find some guidance.I have a CMS and on the actual website I am building I have a nice little slideshow script that runs through all the images in a
Open/Close Links in Php
Hello, Hoping someone can inform me how I can get PHP to automatically open a set of links in a new tabbed window.Example:$start= 1;$var = $start+1;$end = 5000;Website to open:
Undefined variables
hi----------------------------------------------------------------------------------------------------error log "[Sat Jan 09 17:40:00 2010] [error] [client 127.0.0.1] PHP Notice: Undefined
MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it needs to be able to pop up after hitting a button from another main application which would also be a
rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?
Cloud Computing?
Hello,I was wondering if anyone could help explain this term to me. I'm starting to hear it a lot now. Tried looking up some definitions on it via Google and on Wikipedia but its all really technical
how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service
mysql_real_escape_string making variable equal nothing
i post a form and i post the variable:Code: $var = $_POST[variable];then i echo $var its what i submitted the variable to be. then i add the mysql_real_escape_string() function to itspell it correctly
Help, Base64 encoding url and decoding server side.
Hello everyone, i have a website with videos and games and also provide an embed code which people can use to embed the games and videos on their website.My problem is that alot of people would embed
Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to remove the last comma from the string and can't seem to remove it. I have tried chop, rtrim, substr,