can i host a php file on my domain that other domains can include on their site?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brizzad
    holla
    • Jul 2003
    • 11769

    #1

    can i host a php file on my domain that other domains can include on their site?

    say i want to host mydomain.com/hey.php

    and i want other sites to be able to include that php file even though its hosted on my domain

    is that possible?
  • Fake Nick
    So Fucking Banned
    • Jul 2004
    • 7708

    #2
    duh

    Comment

    • psili
      Confirmed User
      • Apr 2003
      • 5526

      #3
      I'm not 100%, but I'd say no as that would be a huge security risk. That, and to my knowledge when another client requests a PHP file it's sent as a parsed file and not PHP code.
      Your post count means nothing.

      Comment

      • brizzad
        holla
        • Jul 2003
        • 11769

        #4
        Originally posted by psili
        I'm not 100%, but I'd say no as that would be a huge security risk. That, and to my knowledge when another client requests a PHP file it's sent as a parsed file and not PHP code.
        well that sucks

        Comment

        • iBOUNCER
          Confirmed User
          • Nov 2004
          • 214

          #5
          Yeah, you can easily make a php script that other sites can 'include' in their pages - they need to include it as javascript and your output needs to be in javascript.

          Same way that things like adwords work.

          You could also do an iframe, but Javascript is probably more widely supported these days.

          Contact me on ICQ if you are concerned about the security.
          Secure PHP Programming - Secure E-Commerce Design
          Site & Server Security Reviews - Code Reviews

          The new and improved iBOUNCER. Give us a try.

          ICQ: 201971159 or http://www.iBOUNCER.com

          Comment

          • FiReC
            Confirmed User
            • Jan 2002
            • 2350

            #6
            include("http://mydomain.com/hey.php");
            www.nubilefilms.com | www.nubiles.net | www.anilos.com | tubescript.nubiles.net | icq4162727

            Comment

            • iBOUNCER
              Confirmed User
              • Nov 2004
              • 214

              #7
              Originally posted by FiReC
              include("http://mydomain.com/hey.php");
              Yeah but this wont work like a local include, as someone mentioned above. It will return the parsed output, and will not be given the chance to evaluate any code locally.

              Besides, the original poster didn't say if they wanted the other webmasters to be able to include his php script into another script or directly into their page.
              Secure PHP Programming - Secure E-Commerce Design
              Site & Server Security Reviews - Code Reviews

              The new and improved iBOUNCER. Give us a try.

              ICQ: 201971159 or http://www.iBOUNCER.com

              Comment

              • brizzad
                holla
                • Jul 2003
                • 11769

                #8
                Originally posted by iBOUNCER
                Yeah, you can easily make a php script that other sites can 'include' in their pages - they need to include it as javascript and your output needs to be in javascript.

                Same way that things like adwords work.

                You could also do an iframe, but Javascript is probably more widely supported these days.

                Contact me on ICQ if you are concerned about the security.
                Thanks

                Comment

                Working...