URL contents

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anishanmugam
Forum Newbie
Posts: 5
Joined: Sat Nov 15, 2008 3:20 am

URL contents

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: URL contents

Post by requinix »

I can't think of any good reason you could have to do that.

Nevertheless, readfile.
anishanmugam
Forum Newbie
Posts: 5
Joined: Sat Nov 15, 2008 3:20 am

Re: URL contents

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: URL contents

Post 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.
anishanmugam
Forum Newbie
Posts: 5
Joined: Sat Nov 15, 2008 3:20 am

Re: URL contents

Post 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
Post Reply