November 13th, 2000, 06:45 AM
This is probably very simple, but I tried looking in php.net and some other web sites, but cannot find the solution to my problem.
There is a file at a certain server www.someserver.com/somefile.txt, which contains text data of roughly this format:
Birthdate=Some birth date
and so on.
What I want to do in the php script is: fetch the information in the text file and take out just what, say, Occupation is = to. In this case, "some occupation". What is the best way to do this and what functions is it best to use here?
November 13th, 2000, 09:09 AM
November 13th, 2000, 09:13 AM
First you can read the files from the other server using file() function.
//read the text file from the other server.
//and put it an array.
//now loop that values.
//split that row value based on '='.
//if row is occupation.
//print the occupation here.
you may find out the occupation row using regex functions as well.
www.jobxyz.com-IT Career Portal
"The fear of the LORD is the beginning of knowledge..."
November 13th, 2000, 09:54 AM
Thanks a lot guys, I got it working!!