Domuta Marcel
Domuta Marcel

Reputation: 509

How to read custom text from external html with fopen in PHP

I wanna read an specified word from an external website, I have an website about mobile phones and I wanna implement price for all models from database, so with help of fopen() I will open an etxternal website like website.com/nokia5500.html so from website source to get the price (external website is an shopping website) Thanks in advance!

Upvotes: 1

Views: 356

Answers (3)

Sithu
Sithu

Reputation: 4862

You can use cURL or file_get_content to request to an external website as Xingjia mentioned.
Then, use QueryPath or Simple HTML DOM Parser to parse the HTML document and get the specific text you want.

Upvotes: 1

powtac
powtac

Reputation: 41060

You could use YQL: http://developer.yahoo.com/yql/ the Yahoo! Query Language

Upvotes: 0

Xingjia Luo
Xingjia Luo

Reputation: 371

You can try to use curl, file_get_content

Upvotes: 1

Related Questions