Trouble fetching game reviews

Avatar image for eylestom
eylestom

4

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Hi guys,

So I thought id cracked it and fetched the reviews from Giantbomb, however they have not automatically fetched any new reviews since the script went live, and I dont know why.

This is the page and code in question, if anyone can see where I've gone wrong it would be a major help!

[

<?php

if (isset($_GET['page'])) {

$p = $_GET['page'];

$offset = $p-1;

}

else {

$offset = "";

}

$vdata = file_get_contents('http://www.giantbomb.com/api/reviews/?api_key='.$giantbomb_key.'&sort=publish_date:desc&limit=10&offset='.$offset.'0&format=json');

$vresponse = json_decode($vdata);

if ($vresponse->results==NULL){

echo '';

}else{

foreach ($vresponse->results as $vresult)

{

echo '<div>

<div>

<h2><a href="/review/'.substr($vresult->api_detail_url, 41, -1).'/'.cano($vresult->game->name).'/" title="'.$vresult->game->name.'">'.$vresult->game->name.'</a></h2>

<div><div><span>'.$vresult->score.'</span></div><span></span><i></i> '.substr($vresult->publish_date,0,10).'<span></span><i></i> '.$vresult->platforms.'</div>

<p>'.add3dots($vresult->deck, "...", 260).'</p>

</div>

</div>

<div></div>';

} } ?> ]