Page 1 of 1

Can i use php in this scenario

Posted: Thu Oct 23, 2008 9:07 am
by naveednaik
Hi
I am relatively new to php so please kndly bear with me. I would appreciate if someone gives me a solution.\
I have two websites with me.
Website 1 & Website 2.
Website 1 has an html file that contains <a href> links.
Now these links i want to display on Website 2.
How can i do this.
Can it be done using php.
<a href="http://indiaprojectsonline.blogspot.com">http://indiaprojectsonline.blogspot.com</a>
Thanks

Re: Can i use php in this scenario

Posted: Thu Oct 23, 2008 10:14 am
by aceconcepts

Code: Select all

file()

Re: Can i use php in this scenario

Posted: Thu Oct 23, 2008 3:24 pm
by Syntac
Or file_get_contents(), if you have PHP 5.

Re: Can i use php in this scenario

Posted: Thu Oct 23, 2008 9:55 pm
by naveednaik
I think u didnt understand.
I have http://website1/one.html
and
I have http://website2/links.html
Now i want to display the links.html of website2 in one.html in website1.
How can this be achieved.
Thanks in advance.

Re: Can i use php in this scenario

Posted: Fri Oct 24, 2008 2:31 am
by aceconcepts
By using the file() function to get the content (file_get_content()) of the site - extracting the links.