[UPHPU] Web page data extraction
Mike Mackrory
mike at echovue.com
Fri Jan 11 11:49:15 MST 2008
Thanks guys! I'll have to give this a whirl!
On Jan 11, 2008 11:02 AM, Mike Mackrory <mike at echovue.com> wrote:
> I have an interesting question.
>
> I wrote an Access application a year or two ago that I'm looking at rewriting
as a web app. One thing I'm not sure I can move over to a web app is a tool I
put together to let the users extract data from web pages.
>
> In the Access App, I open a browser window, they can log into the secure
site, find the page with the data they need, then click a button and the
program then takes the HTML source, parses out the necessary info and then
loads it into the local database.
>
> Does anyone know if this is possible to do using PHP or JavaScript. Using an
IFrame would be perfect, but since the site they want to extract the info from
is on a different domain this doesn't appear to be possible. Anyone have any
idea's of how I could do this? The big obstacle is just finding a way to get
the source code of the web page being viewed.
>
> Thanks
>
> Mike
>
You can get the source of the page by using fopen. http://us.php.net/fopen
And like Wade said, you can use Curl to handle the logging in and
stuff. http://us.php.net/curl
Dave
More information about the UPHPU
mailing list