Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9023561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:47:25+00:00 2026-06-16T05:47:25+00:00

I have an array http://www.postano.com/api/posts.php?ak=XXXX&ts=XXXXX&sig=XXXXX&postano=12345&start=0&count=20 I will be fetch first 20 records initially. Here

  • 0

I have an array

http://www.postano.com/api/posts.php?ak=XXXX&ts=XXXXX&sig=XXXXX&postano=12345&start=0&count=20

I will be fetch first 20 records initially.
Here is the class

class social extends CI_Controller{
function data()
{
$start = $k;

$resultjson = $this->curl->simple_get("http://www.postano.com/api/posts.php?ak=XXXXX&ts=XXXXX&sig=XXXXX&postano=12345&start=$k&count=20");
$resultant_data = json_decode($resultjson,true);
foreach ($resultant_data as $key => $value)
     {
     //print_r($value);
     $this->load->view('feeds',$value);
     }
 }

}

Here feeds is my view.

How can i fetch next 20 records say start or $k = 20 so that I can display the results from 0-20 then 21-40 and so on...

I am trying to implement an autoload or loadmore functionality.
I am not using model(database) the only source is json response

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:47:26+00:00Added an answer on June 16, 2026 at 5:47 am

    Since you mentioned over chat that you want to use AJAX, on page load have the first request you wanted. Load up your 20 results.

    When you want more results, send an AJAX request and from the script that got requested curl request more products from a specified starting point and limit like Havelock mentioned, something along the lines of

    http://www.postano.com/api/posts.php?ak=XXXX&ts=XXXXX&sig=XXXXX&postano=12345&s‌​tart=21&count=20
    

    Then return the results you got form your ajax request and append it to the page if you want to keep the first 20 results that you had from page load, otherwise replace it.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large array of URLS similar to this: $nodes = array( 'http://www.example.com/product.php?page=1&sortOn=sellprice',
I have code like this <?php $array = array('http://www.google.com', 'http://www.facebook.com', 'http://www.twitter.com'); foreach ( $array
I have an array of patterns: $patterns= array( '#http://(www\.)?domain-1.com/.*#i', '#http://(www\.)?domain-2.com/.*#i', ... ); and I
I have an array of url strings (i.e. http://www.cnn.com) which I want to iterate
I have these urls from a web log : http://www.domain.com/page?s=194&client=151678&m=a4a&v=1&g=54 http://www.domain.com/page?s=51&client=617171&m=b4z&v=8&g=97 How can I
If I have an array containing a number of urls: ['http://www.abc.com', ..., 'http://www.xyz.com'] for
Hi i have a multidimensional associative array: $array= array( 'Book1' => array('http://www.google.com', '45' ),
I have an array like so: array{ [39] => src=http://www.google.com/jsapi> [111] => src=http://www.example.com/wp-content/themes/code.js [55]
I have a url http:// * .com/branch/module/view/id/1/cat/2/etc/3. It becomes. array ( 'module'=>'branch', 'controller'=>'module', 'action'=>'view'
I have an array of data returned from the eventbrite.com api stored in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.