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
parsing a website dynamically
Moderator: General Moderators
Re: parsing a website dynamically
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.
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
Thanks a lot...... got the answers....