Something went wrong. Try again later

lashaparesha

This user has not updated recently.

6 0 3 1
Forum Posts Wiki Points Following Followers

lashaparesha's forum posts

Avatar image for lashaparesha
lashaparesha

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

Avatar image for lashaparesha
lashaparesha

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

#2  Edited By lashaparesha

@szlifier:

sorry mate im new on codding and im getting this error >> Parse error: syntax error, unexpected ':' in /home/u155508610/public_html/api/games/all_platforms.phpon line 19

here is code

$opts = array(

'http'=>array(

'method'=>"GET",

'header'=>"User-Agent: lashaparesha api script\r\n"

));

$context = stream_context_create($opts);

$url = https://giantbomb.com/api/platforms/?api_key='.$giantbomb_key.'&sort=release_date:desc&field_list=id,image,name,date_added,deck,platforms&limit=10&offset='.$offset.'0&format=json

$file = file_get_contents($url, false, $context);

$vresponse = json_decode($vdata);

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

echo '';

}else{

foreach ($vresponse->results as $vresult)

Avatar image for lashaparesha
lashaparesha

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

#4  Edited By lashaparesha

@jslack: how to make with curl can u give me example?

there is my example :

$vdata = file_get_contents('https://www.giantbomb.com/api/platforms/?api_key='.$giantbomb_key.'&sort=release_date:desc&field_list=id,image,name,date_added,deck,platforms&limit=10&offset='.$offset.'0&format=json');

$vresponse = json_decode($vdata);

Avatar image for lashaparesha
lashaparesha

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

@flippyandnod: when i enter this url on browser adress bar its give me content, but from site its not working
https://www.giantbomb.com/api/platforms/?api_key=4c9947799502fd3688ae86********************&sort=release_date:desc&field_list=id,image,name,date_added,deck,platforms&limit=10&offset=0&format=json

Avatar image for lashaparesha
lashaparesha

6

Forum Posts

0

Wiki Points

1

Followers

Reviews: 0

User Lists: 0

#6  Edited By lashaparesha

Hello im getting this error when i want to get content from api

Warning: file_get_contents(http://www.giantbomb.com/api/platforms/?api_key=4c9947799502fd3688ae8*******&sort=release_date:desc&field_list=id,image,name,date_added,deck,platforms&limit=10&offset=0&format=json): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in/home/u******/public_html/api/games/all_platforms.php on line 10