Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://example-foo-bar.com?l=100&o=0 // returns the first 100 items.
- https://example-foo-bar.com?l=100&o=0
- https://example-foo-bar.com?l=100&o=99
- https://example-foo-bar.com?l=100&o=199
- https://example-foo-bar.com?l=100&o=218 // end of response ?
- function testLoop(){
- $limit = 100;
- $count = getCount();
- $j = ceil($count/$limit);
- for ($i = 0; $i < $j; $i++){
- $offset = $i*100;
- echo 'https://example-foo-bar?limit='.$limit.'&offset='.$offset.'';
- }
- }
- testLoop();
Add Comment
Please, Sign In to add comment