Solved

Sending x bytes to the user before adding a "Next >" button.

Posted on 2004-10-29
166 Views
Last Modified: 2008-03-06
I have a massive database of info and I want to display it all in one list. However, I want google to be able to index it all, so every however many bytes I'd like to say "hey, ok, I wont show any more on this list, I'll add a next button and carry on from there".

With me?

I hope so. How do you suggest I approach this best?

Thanks in anticipation.
0
Question by:m175400
    3 Comments
     
    LVL 48

    Expert Comment

    by:hernst42
    you might check if the $_SERVER['HTTP_USER_AGENT'] contains Googlebot. In that case show all entries, if not show the pager.
    See http://www.ericgiguere.com/articles/masquerading-your-browser.html
    0
     
    LVL 1

    Author Comment

    by:m175400
    Thanks, but I want to know how to tell how many bytes I've processed though, not tell if it's google or not.
    0
     
    LVL 48

    Accepted Solution

    by:
    you could use the output-buffer-function of php.
    http://de3.php.net/manual/en/ref.outcontrol.php

    use ob_start() at the beginning of your script. check the size of the so far genereated output with
    ob_get_length()

    If it has come accross a certain amount end generating additional content,
    use ob_end_flush to send that output and then start the pager
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: Foundations of Front-End Development

    Jump-start a lucrative career in front-end web development, with zero previous coding experience required. This course covers the basic programming concepts and languages required for creating engaging websites from scratch.

    Suggested Solutions

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to count occurrences of each item in an array.

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now