darmohray Posted June 12, 2007 Share Posted June 12, 2007 I need help in writing some client-side Javascript (for page 1) that will request a new URL (page 2), parse the resulting HTML, find a set of email addresses embedded in an HTML table, and then finally call a another page (page 3) passing as query strings the emails found on page 2. I know how to do a window.open("URL"), but how to actually have the javascript get the resulting HTML as a long string, and then parse it looking for email addresses? Thanks for any help/advice you can provide. Gregory Link to comment https://forums.phpfreaks.com/topic/55220-scraping-another-url/ Share on other sites More sharing options...
Goose Posted June 12, 2007 Share Posted June 12, 2007 Gregory- I would recommend using AJAX. This is because JavaScript is a client-side scripting language, meaning it doesn't have access to a lot of server functions. I would use AJAX that makes an asynchronous to some server scripting file on your web server, and have that file parse your second page and send the e-mail result back to the AJAX handler. There are tons and tons of AJAX libraries and tutorials out there. That is the route I would take. Link to comment https://forums.phpfreaks.com/topic/55220-scraping-another-url/#findComment-273018 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.