php forum
php mysql forum
php mysql smarty
 
Topic Options
#101213 - 09/17/00 07:22 AM Could someone help me with a small script?
VJ Offline
Junior Member

Registered: 02/20/00
Posts: 20
Loc: Finland
Okay, thanks for popping in. I really need this thing but I can't do it myself, since I dont know Perl enough.

I need a CGI script, that'll take the 5 latest news headlines & their post dates from my index.shtml frontpage file, and output them into plain, simple html page using the qq() output like this - I can format the output to suite my site later - THAT I can do :

(Date) - (News Headline)
(Date) - (News Headline)
...

How to locate this data from the index.shtml file, then? It should be easy - here's how to do it, let's look inside the file for an example: Replace (...) with the HTML tag thingies!

Code:
code:


News headlines: So basically you have to hunt for the (p class="NewsHeadline") tag, and then take everything from it's location forward, until you reach the end paragraph (/p) tag, which specifies the end of the news headline.

News dates: Then you have to go back upwards the file, until you find the previous (there always is one) (p class="NewsDayHeadline") tag and take the contents inside that tag, as it states the news date, which sould also be included on the output.

Finally, the script should print out empty lines or exit, if it cannot find the five items required (on beginning of the month there aren't that many news to report, you know ...)

So, could anyone help me? No fees are coming to your way, but a mention on site credits could be arranged.

Contact: webmaster@b5itf-finland.org

------------------
"There is a forklift on your mind."

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks