Jump to content

WebmasterGuy

New Members
  • Posts

    3
  • Joined

  • Last visited

WebmasterGuy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes unfortunately the site is not giving me any options to grab partial content. They only give me the full Feed, either in JSON or XML format. Thx for your input. EDIT: BTW, is it too hard to do the MySql part? I have some very basic knowledge about PHP+MySql, do you think I need to hire a programmer or is there some guide to do something like this. I looked for some help in google, but every page I find, it looks like oriented to advanced programmers, and they avoid posting the whole process, like assuming the reader is an advanced coder.
  2. Thanks, I tried inserting that code into the PHP file, but received some error: Parse error: syntax error, unexpected T_VARIABLE I understand, so do you think it's better to send all this to a MySql DB and then get the data from there? Thanks for your message.
  3. Hello everyone, I'm new here. Amazing forum, I found some help in the past by searching google. Now I am looking for some help with the following code, I use this code to grab a JSON Feed and list the items in my page, this code works fine to get all the items, but I need to limit the number of items, otherwise It will load more than 500 items in my page and never stop loading. Is there a way to limit the number of items grabbed from the JSON Feed? Let's say, list 50 items in page 1, another 50 in page 2 and so on? <?php $data = file_get_contents('http://json-url.com/type=json'); $decode = json_decode($data, true); foreach($decode as $d) { if($d['status'] == true){ echo '<div class="div">'; echo '<a href="'.$d['item_url'].'">'; echo '<img src="'.$d['item_image']['jpeg_thumbnail'].'" />'; echo '<span>'.$d['item_name'].'</span>'; echo '</a>'; echo '</div>'; } } ?> Thanks!
×
×
  • 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.