Load text file and display with pagination?

Status
Not open for further replies.

Mike

New member
Jun 27, 2006
6,777
116
0
51
On the firing line
Here's what I want to do: I want to pull a text file from another website, save it to my server, then display that file on my site with pagination.

Can anybody point me in the right direction? I don't need you to code it, just tell me where to look. I've searched around google, but I guess I'm having problems figuring out "what" to search for to get the answers. :(

Thanks!
 


Hmm...there's probably several ways to do this. My advice to you would be use PHP's filesystem functions like fopen, and fwrite. You can see the documentation here:

PHP: Filesystem Functions - Manual

Some may prefer to use cURL. I think smaxor wrote an excellent tutorial on cURL.

As for pagination, there are tutorials all over. One of my favorite places to look for tutorials is:

Photoshop Tutorials, Flash Tutorials and More! P2L Tutorial Search

I have seen several pagination tutorials there. I hope this helps you out :-)
 
Pagination as in:

Take X words (200, 500) from the textstring, make it a page.
Put a link to the next page, i+1
Take the next X words and make it the second page.
Put a link to i-1 and i+1
....

You should be able to do that.
::emp::
 
Status
Not open for further replies.