Thread: PHP/Perl/Web
View Single Post
Old 10-04-2006, 09:52 AM   #1 (permalink)
Jinn
Lover - Protector - Teacher
 
Jinn's Avatar
 
Location: Seattle, WA
PHP/Perl/Web

Has anyone ever written a script to automatically give a brief description of the document? One of the sites I'm working on is a newspaper, and I have to manually grab the headline and first 5 or 6 lines and use that as the "teaser." Would there be any way to automate this? I don't think I could guarantee that every article would have the same number of lines between headline and body text.

Similarly, I use a PHP script to insert an article into the center div in my page. Unfortunately, if the page is really long, when it inserts the article it doesn't jump back to the top of the page. I can't really use #id tags, because the base document never changes - just one div is re-filled.

Any suggestions?
__________________
"I'm typing on a computer of science, which is being sent by science wires to a little science server where you can access it. I'm not typing on a computer of philosophy or religion or whatever other thing you think can be used to understand the universe because they're a poor substitute in the role of understanding the universe which exists independent from ourselves." - Willravel
Jinn is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36