RE: [PHP] extracting text from text file to be used in PHP
| From: | Boaz Yahav | Date: | Sat, 14 Jun 2003 10:27:24 +0000 |
| Subject: | RE: [PHP] extracting text from text file to be used in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151468@lists.php.net to get a copy of this message | ||
You can also use regular expressions.
Here is an example :
How to extract a string from a bigger string or from an HTML block with
regex and PHP
http://examples.weberdev.com/get_example.php3?count=3167
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
-----Original Message-----
From: Lance Q [mailto:lanceq@uncle-eazy.com]
Sent: Saturday, June 14, 2003 1:41 AM
To: php-general@lists.php.net
Subject: [PHP] extracting text from text file to be used in PHP
Hello all,
One of the sites I host is a radio station. Their computer has been
setup to automagically upload the current song and the next song to
their web site via FTP. Unfortunately, the format it comes in is pretty
awful. (See below). <tag> The CURRENT CutID is: 70428 The Type is: MUS
The ArtistName is: Nena The SongTitle is: 99 Luft Balloons (German) The
Duration is: 00:03:48 </tag>
What I would like to know how to do is extract the relevant info
(everything after the : for instance) and manipulate it, possibly as a
variable so that $ArtistName=Nena for instance.
I've looked through the php.net manual for fgets and such, but no luck.
Thanks in advance,
Lance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php