views:

77

answers:

1

Hi,

my question is as follows:

assume there is a website called website.com/a

the website is being developed using PHP, Perl, Ruby and other languages.

i want to be able from my website to read this website pages, execute the code and then analyse the HTML result page tags and getting the content using PHP.

it's like reading news from some news websites and then displays it in my website in different format or different style.

thank you

+4  A: 

I'm not sure you understand this aspect of web programming, but you cannot access the server-side code which generated the HTML. You can of course parse the HTML which is returned from the server by using one of many HTML parsers.

That may or may not have been what you asked, because your question is a bit vague to me. Note that if you want to collect information from other web pages on your web page, you should make sure your web site doesn't make a request to those other web pages each time a user visits your site. (Phew, that was a handful!) You need to implement some sort of caching of the other web sites' content.

Deniz Dogan