Page 1 of 1

URL contents

Posted: Sat Nov 15, 2008 3:30 am
by anishanmugam
Hi guys ,


I want to get the web page contents (example yahoo home page) and display using php.

Help me if you know

Thanks
Anitha.S

Re: URL contents

Posted: Sat Nov 15, 2008 3:45 am
by requinix
I can't think of any good reason you could have to do that.

Nevertheless, readfile.

Re: URL contents

Posted: Sat Nov 15, 2008 3:55 am
by anishanmugam
I want to retrieve the content say application number, date, filling date like that and i want to store that in to mysql database.

Re: URL contents

Posted: Sat Nov 15, 2008 3:59 am
by alex.barylski
file_get_contents or any of those related functions will fetch data from an URL if they have URL wrappers enabled on the system. Otherwise you will need to use cURL or similar.

As for fetching the dates, etc...have fun...thats a lot of work...even with a DOM you need to convert dates into a standard format for them to be of any use to the computer...and when the web page changes format...bam your code breaks.

Re: URL contents

Posted: Mon Nov 17, 2008 12:11 am
by anishanmugam
using curl function i retrieved the web page content. Will it possible to retrieve some specified data in that web page using php



Thanks

S.Anitha