Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder musher's Avatar
    Join Date
    Jan 2005
    Location
    Minnesota
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there a way to include a file from another Domain

    Ok this is a strange one, but company politics are in play here, yea I wish they would just give me FTP access to their server.

    I've used includes before but having problems with this (not even sure you can do it).

    I have a site that was set up and is maintained by another company (mycompany.com) there is a Whats New section on the home page I have another site (mycompany.biz).
    I would like to set the Whats New section on the .com site to be an included file from the .biz site (since I can maintain pages on the .biz site but not the .com site)

    So I'm looking to do something like this on the index.htm of the mycompany.com site, but it's not working.

    Code:
    <!--#INCLUDE file="www.mycompany.biz/includes/whatsnew.htm"-->
    Thanks
    Jim M

    "Lord, help me to become the person my dog thinks I am" - Dawn Ewing
    "If you must know. Yes, I do enjoy running after the dog sled when I fall off" - Me

    www.huskyzone.com -- Woodland Siberians

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Posts
    301
    Thanks
    7
    Thanked 2 Times in 2 Posts
    If you can use PHP then yes it is possible. I don't think it is using a INCLUDE exec.

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,472
    Thanks
    0
    Thanked 634 Times in 624 Posts
    Try adding http:// to the front of the domain name in the file=
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Most languages I know of don't have a mechanism for including a file like that out of the box. But most languages do have HTTP classes or functions which would allow you to request that file, and inject the response into your document.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •