Retrieving and storing data from pls file in PHP

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

Answers


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


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


Need Your Help

How to display 'IntelliSense Babel icons in WPF?

.net wpf babel

How to display these 'IntelliSense Babel Icons' in a WPF Application?