RE: [PHP] extracting text from text file to be used in PHP

2003-06-14 Thread Boaz Yahav
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:[EMAIL PROTECTED] 
Sent: Saturday, June 14, 2003 1:41 AM
To: [EMAIL PROTECTED]
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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] extracting text from text file to be used in PHP

2003-06-13 Thread Jeff Harris
On Jun 13, 2003, Lance Q claimed that:

|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.


http://us3.php.net/manual/en/function.explode.php
-- 
Registered Linux user #304026.
lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import
Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php