0

I need to create a series of regular expressions to get data out of a pls file in PHP (a language I've only just started learning).

The file will output data similar to this:

[playlist]
numberofentries=1
File1=http://203.150.225.71:8000
Title1=(#1 - 3687/5000) Example Radio Station 
Length1=-1
Version=2

I need to retrieve and store the location of the stream with the port number included as well as the title.

I need advice on the best way to do this.

Any help will be appreciated. Thanks

4

2 回答 2

3

You can use PHPs buit in function parse_ini_file to parse the ini formatted file.

于 2012-06-11T14:18:57.000 回答
0

Looks like an INI file to me. Maybe Zend_Config_Ini would be a useful way to parse it..

http://framework.zend.com/manual/en/zend.config.adapters.ini.html

于 2012-06-11T14:18:47.410 回答