Forum Moderators: coopster

Message Too Old, No Replies

getting server info of "include" function site

include function

         

Minuteman

5:26 am on Apr 23, 2007 (gmt 0)

10+ Year Member



I'm trying to display a directory on remote sites. Let's call the site that the directory is on "site A". I can display the directory fine on any site using an iframe.

I would like to use php to do the same thing but nothing seems to work. Using the include() function opens the initial page fine but every link in the site won't work. If I make them static to the original site they, well, go there instead of "including" the page. I've tried a number of server functions to try to pick up the sending site but so far nothing.

Can someone get me pointed in the right direction to get something like this to work?

phparion

8:30 am on Apr 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



your explanation is not very clear however, if you want to browse the directory on remote site then you can make a page with a frameset of two frames.

the upper frame will be of zero height so that it is invisible, put your include script in the default page of this upper frame which is of zero size,

your main frame will display the files and folders from the remote site, in your URLs give the target frame is your main frame this will keep the visitor on your site.

however if the above is not possible then you can do something like giving the URLs of remote site as

www.yourdomain.com/include.php?url=www.remote-site-url.com/foldername/

this way your visitor will remain on your site however you will get the complete new URL of the remote site in a query string variable.