Page 1 of 1

parsing a website dynamically

Posted: Sat Jun 20, 2009 6:09 pm
by lmadan
Hi,


I am pretty new in PHP and want to parse a website on run time. So it's like if a user provides a website address and a keyword to look for, then i want to display the complete line and also some related information under that area.
For example: if the user provides the website address as:

http://www.amazon.com/Biology-Mastering ... 929&sr=8-1

and wants to find the ISBN10, ISBN13, Weight, Dimensions, and Current Price from the page...

Thanks for the help in advance....

Regards,
Lokesh

Re: parsing a website dynamically

Posted: Sun Jun 21, 2009 8:02 am
by Eric!
At first it might seem difficult, but everything is difficult at first.

The approach to your problem:
Learn how to process forms with php
Learn how to read websites (fopen with url)
Learn how to search for matching strings (php string manipulation)
Learn how to parse the pieces you want (experiment on target sites)
Learn how to output your results in html friendly tags

Then as a bonus make sure you didn't make your site vulnerable to xss attacks.

Re: parsing a website dynamically

Posted: Mon Jun 22, 2009 3:48 pm
by lmadan
Thanks a lot...... got the answers....