Jump to content

Same script, yet no results show up


divito

Recommended Posts

I have a website I'm doing (here), and you'll notice on the right side that one table has no results. I utilize magpieRSS and put the RSS feed URLs into arrays, and sort through them to establish the latest news and display the results.

 

All my feeds and scripts were working fine until I added a new URL. Now, as aforementioned, no results show up (and you can see in the link where it is). Nothing has changed inside the script, except the addition of the new URL and all the other scripts are structurally the exact same, minus the additions of 1,2,3 etc... so that they play nicely (they didn't before I did that).

 

When it first stopped working, I changed the $readmore value to try and see if I can remedy it, but to no avail.

 

Any thoughts?

 

<? 

$sc = array ('http://www.mymym.com/en/rss/game/sc.xml', 'http://www.sk-gaming.com/rss/channel/sc', 'http://sc.gosugamers.net/sc.rss', 'http://readmore.s3.amazonaws.com/rss/eu/rss_headlines_rmeu.rss');

foreach ($sc as $feed3 ) {
$rss3 = fetch_rss($feed3);

foreach ($rss3->items as $item3 ) {
     $date3  = $item3['date_timestamp'].microtime(TRUE);
  
     $entries3[$date3] = $item3;
}
}
krsort($entries3);

$counter3 = 0;

foreach ($entries3 as $entry3) {

if ($counter3 == 10) {
?>
  <tr>
<td width="16"><img src="esmini.jpg">
<td width="250" height="16" ><?
echo "<a href=$link>More...</a></li><br>";?> </td>
<?
break;
}	if ($counter3 < 10) {

$counter3++;
$url = $entry3['link'];
$title = $entry3['title'];
$category = $entry3['category'];
$title = str_stop($title, 35);
$mym  = strpos($url, 'mymym.com');
$skgaming = strpos($url, 'sk-gaming.com');
$readmore = strpos($category, 'Star');
$gosu = strpos($url, 'gosugamers.net');

  if ($mym == true) {
    ?>
  <tr>
<td width="16"><img src="mym.jpg">
<td width="250" height="16" ><?
echo "<a href=$url target='_blank'>$title</a></li><br>";?> </td>
<?
} if ($skgaming == true) {
?><tr>
<td width="16"><img src="sk.jpg">
<td width="250" height="16" ><?
echo "<a href=$url target='_blank'>$title</a></li><br>";?></td>
<?

} if ($readmore == true) {
?><tr>
<td width="16"><img src="readmore.jpg"></td>
<td width="250" height="16"><?
echo "<a href=$url target='_blank'>$title</a></li><br>";?></td>
<?

} if ($gosu == true) {
?><tr>
<td width="16"><img src="gosu.jpg"></td>
<td width="250" height="16"><?
echo "<a href=$url target='_blank'>$title</a></li><br>";?></td>
<?
}
}
}
?>

 

And on a separate note, the load times on the page leave something to be desired. I've already turned on the caching that magpie offers, but it still takes awhile. Is there anything else I can do to speed it up?

Link to comment
https://forums.phpfreaks.com/topic/150570-same-script-yet-no-results-show-up/
Share on other sites

The "Coverage" and "News Feed" links both show up for me for each game. 

 

Er, really? You get 10 links + More under Starcraft?

 

That's the other weird part I didn't mention. "More..." is only supposed to be done after 10 results are posted and the counter reaches 10. The fact that it's showing up and there is nothing prior is weird.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.