Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Included Content

     
9:02 am on Mar 21, 2003 (gmt 0)

Full Member

10+ Year Member

joined:May 18, 2002
posts:210
votes: 0


I am including some content from another domain using PHP. The url's in the links are relative. What is the easiest way to include the content of linked page?

For example, I include otherdomain.com/foo.html in mydomain.com/include.php. foo.html has a link to bar.html. I don't have a page for bar.html on my server.

What is the best way to include bar.html from otherdomain using PHP?

I thought about a custom 404 page but am wondering if there is a simpler solution that doesn't generate an error.

9:06 am on Mar 21, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Can you not just add 'othersite.com/' to the beggining of foo.html and open it the same way as the first page?

Nick

7:12 pm on Mar 21, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 1, 2000
posts:165
votes: 0


i have the same need -

i had been using a simple php include tag - then with new php load the include function went away --

[edited by: jatar_k at 7:28 pm (utc) on Mar. 21, 2003]