0byt3m1n1
Path:
/
home
/
k
/
a
/
s
/
kassiope
/
www
/
cron
/
[
Home
]
File: instagram__.php
<?php include(__DIR__.'/../configuration.inc.php'); $results = file_get_contents("https://api.instagram.com/v1/users/8753528747/media/recent/?access_token=8753528747.1677ed0.4306f5519ce84406b0e56d1715aca666", false, stream_context_create($arrContextOptions)); $shots = json_decode($results); //print_r($shots->data); $cpt=0; foreach($shots->data as $istg) : if($cpt==0) mysql_query_override("truncate table gaia_instagram"); $istg_thumbnail = $istg->{'images'}->{'standard_resolution'}->{'url'}; $istg_link = $istg->{'link'}; $istg_caption = @$istg->{'caption'}->{'text'}; mysql_query_override("insert into gaia_instagram (url, link, text) values ('".$istg_thumbnail."', '".addslashes($istg_link)."', '".addslashes($istg_caption)."')") or die(mysql_error()); $cpt++; if($cpt==6) break; endforeach;