I'm not sure if you actually deserve a reply when you are demanding source code...
However...
Take a look at the file() function
www.php.net/manual/function.file.php
It reads a file into an array.
Then take a look at each() which returns keys and values from an array.
http://www.php.net/manual/function.each.php
Then check out list() which is a language construct used to assign multiple variables in one statement (for example multiple return values).
http://www.php.net/manual/function.list.php
You will have to parse out the values so a good look at explode() will be neccesary.
http://www.php.net/manual/function.explode.php
Now, check out the pseudocode previously posted and to your you as a programmer and implement it 😉
/ Ronnie Bahlsten