<?php
$private=\'YOUR PRIVATE API KEY HERE\';
$public=\'YOUR PUBLIC API KEY HERE\';
$my_url=\'YOUR BASE URL HERE\'; // FOR EXAMPLE I HAVE http://marvel.omatech.com
$timestamp=time();
$hash=md5($timestamp.$private.$public);
$items=100;
$marvel_url="http://gateway.marvel.com:80/v1/public/characters?limit=$items&ts=$timestamp&apikey=$public&hash=$hash";
$i=0;
while ($i<15)
{
echo \'<a href="\'.$my_url.\'?pagina=\'.$i.\'">\'.$i.\'</a> - \';
$i++;
}
echo \'<br />\';
//echo $url;
$marvel_url=$marvel_url.\'&offset=\'.($items*$_REQUEST[\'pagina\']);
//echo $marvel_url;
echo \'<br />\';
$ret=file_get_contents($marvel_url);
//echo $ret;
$arr_ret=json_decode($ret);
//print_r($arr_ret);
$status_code=$arr_ret->code;
$etag=$arr_ret->etag;
foreach ($arr_ret->data->results as $character)
{
echo \'<div class="character"><span style="float:left">\';
echo $character->id.\': \';
echo $character->name;
echo \'</span>\';
$image_url=$character->thumbnail->path.\'/portrait_xlarge.\'.$character->thumbnail->extension;
echo "<img style=\'float:left\' src=\'$image_url\' />";
echo \'</div>\';
}