PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 12th, 1999, 12:32 PM
leander
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hello,

I' ve got a messageboard, which is in CGI. It uses a file named toc.dat to display the messages. Here is how this information is stored:

1790|~%|0|~%|12-12-1999|~%|18:16|~%|name|~%| |~%|subject
1789|~%|0|~%|12-12-1999|~%|18:07|~%|name|~%| |~%|subject
1791|~%|1|~%|12-12-1999|~%|18:26|~%|name|~%|email|~%|subject

As you can see, each line starts with a message-identifier.
Now, I would like to use a PHP3-script, which displays the last 5 entries on the main page of my website. Is it possible to extract the subject out of this dat-file?

I have only just begun to learn php and cgi, so please be elaborate URL


Thank you very much....
Leander

Reply With Quote
  #2  
Old December 12th, 1999, 10:59 PM
Darguz
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Try the explode() function:

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
$entry=explode("|~%|", $logline);
[/quote]

The subject will be in $entry[6].

------------------
Alan Little
Holotech Web Design
www.holotech.net/




[This message has been edited by Darguz (edited 12-12-99).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Some help for a newbie

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap