there are numerous tutorials on the web, here is a searched link from yahoo
this will give you a number of results, can't remember which one it is, but on the first page, there is a really good tut
oh, and btw, whatever they say, you don't have to use lynx browser to run the php page, you can use wget, have a look see and do some reading of those links and you will get it figured out