Running PHP from a remote server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Troy

    Running PHP from a remote server

    My ISP provides me with 2 servers: one for normal web hosting
    (non-PHP) and a CGI server (with PHP). I create my website using
    fusion 7 and upload this in its entirity to the web hosting server. If
    I want to run CGI scripts, I can do so with an external link to a page
    on the CGI server. The problem however is that I have to maintain two
    sites and all associated links.

    Ideally, I'd like everything to be in one place, but I'm not allowed
    to upload my entire site to the CGI server. Alternatively then, is
    there a way of calling PHP scripts on the CGI server from a non-CGI
    server, without resorting to a clickable link. I can include HTML such
    as <A HREF="http://cgiserver/......>php script link<A>, however this
    requires the user to click on some text to run my script. I'd like to
    run the script from the remote server without them clicking.
  • Ken Robinson

    #2
    Re: Running PHP from a remote server


    Troy wrote (in part):[color=blue]
    >
    > Ideally, I'd like everything to be in one place, but I'm not allowed
    > to upload my entire site to the CGI server. Alternatively then, is
    > there a way of calling PHP scripts on the CGI server from a non-CGI
    > server, without resorting to a clickable link. I can include HTML such
    > as <A HREF="http://cgiserver/......>php script link<A>, however this
    > requires the user to click on some text to run my script. I'd like to
    > run the script from the remote server without them clicking.[/color]

    Get your code off of your ISP onto a real hosting site. That is no way
    to do hosting.

    Ken

    Comment

    • Troy

      #3
      Re: Running PHP from a remote server

      Ken,

      You're probably right....I'm just at the outset of trying to learn
      about all this server side scripting at the moment, and not to sure
      what is and isn't best practice - so don't feel too confident about my
      ability to choose a 'good' host. Would I be right in saying that my
      ISP's practice of separate web & CGI servers isn't normal, 'cos it's a
      pain in the but having to separate out the cgi and non-cgi pages?

      Troy.


      On 31 Aug 2005 06:37:09 -0700, "Ken Robinson" <kenrbnsn@rbnsn .com>
      wrote:
      [color=blue]
      >
      >Troy wrote (in part):[color=green]
      >>
      >> Ideally, I'd like everything to be in one place, but I'm not allowed
      >> to upload my entire site to the CGI server. Alternatively then, is
      >> there a way of calling PHP scripts on the CGI server from a non-CGI
      >> server, without resorting to a clickable link. I can include HTML such
      >> as <A HREF="http://cgiserver/......>php script link<A>, however this
      >> requires the user to click on some text to run my script. I'd like to
      >> run the script from the remote server without them clicking.[/color]
      >
      >Get your code off of your ISP onto a real hosting site. That is no way
      >to do hosting.
      >
      >Ken[/color]

      Comment

      • Kimmo Laine

        #4
        Re: Running PHP from a remote server

        "Troy" <troy@nospam.co m> kirjoitti
        viestissä:gkbbh 1tnmlk6dd3hqotj fejknj0bi79jni@ 4ax.com...[color=blue]
        > My ISP provides me with 2 servers: one for normal web hosting
        > (non-PHP) and a CGI server (with PHP). I create my website using
        > fusion 7 and upload this in its entirity to the web hosting server. If
        > I want to run CGI scripts, I can do so with an external link to a page
        > on the CGI server. The problem however is that I have to maintain two
        > sites and all associated links.
        >
        > Ideally, I'd like everything to be in one place, but I'm not allowed
        > to upload my entire site to the CGI server. Alternatively then, is
        > there a way of calling PHP scripts on the CGI server from a non-CGI
        > server, without resorting to a clickable link. I can include HTML such
        > as <A HREF="http://cgiserver/......>php script link<A>, however this
        > requires the user to click on some text to run my script. I'd like to
        > run the script from the remote server without them clicking.[/color]

        how about
        <script type="text/javascript"
        src="http://www.urltotheoth er.site/cgi/mythingy.php"></script>

        or alternatively call it as a src for an image.

        <img src="http://www.urltotheoth er.site/cgi/mythingy.php"
        style="display: none;">

        Or yet another one: make it an iframe.

        <iframe src="http://www.urltotheoth er.site/cgi/mythingy.php"
        style="display: none;"></iframe>

        That'll fool the browser to think it needs to fetch some content from the
        other site. Thus we have successfully disguised a script to be run as an
        image or a script or just another page.

        IMHO, the iframe solution would be the best, cos that's not even fooling the
        browser. And you can be quite sure that content isn't cahced in that case...
        If I were you, I'd use the iframe. Just make it small enough, like on pixel
        wide and heigh, hide it in every possible way using css, and that's it! It
        gets fetched every time but is invisible to the user...

        --
        SETI @ Home - Donate your cpu's idle time to science.
        Further reading at <http://setiweb.ssl.ber keley.edu/>
        Kimmo Laine <eternal.erecti onN0@5P4Mgmail. com>


        Comment

        • Troy

          #5
          Re: Running PHP from a remote server

          Many thanks Kimmo, your HTML is better than mine, I'll try out those
          suggestions and post back.

          On Wed, 31 Aug 2005 21:05:34 +0300, "Kimmo Laine"
          <eternal.erecti onN0.5P@Mgmail. com> wrote:
          [color=blue]
          >"Troy" <troy@nospam.co m> kirjoitti
          >viestissä:gkbb h1tnmlk6dd3hqot jfejknj0bi79jni @4ax.com...[color=green]
          >> My ISP provides me with 2 servers: one for normal web hosting
          >> (non-PHP) and a CGI server (with PHP). I create my website using
          >> fusion 7 and upload this in its entirity to the web hosting server. If
          >> I want to run CGI scripts, I can do so with an external link to a page
          >> on the CGI server. The problem however is that I have to maintain two
          >> sites and all associated links.
          >>
          >> Ideally, I'd like everything to be in one place, but I'm not allowed
          >> to upload my entire site to the CGI server. Alternatively then, is
          >> there a way of calling PHP scripts on the CGI server from a non-CGI
          >> server, without resorting to a clickable link. I can include HTML such
          >> as <A HREF="http://cgiserver/......>php script link<A>, however this
          >> requires the user to click on some text to run my script. I'd like to
          >> run the script from the remote server without them clicking.[/color]
          >
          >how about
          ><script type="text/javascript"
          >src="http://www.urltotheoth er.site/cgi/mythingy.php"></script>
          >
          >or alternatively call it as a src for an image.
          >
          ><img src="http://www.urltotheoth er.site/cgi/mythingy.php"
          >style="display :none;">
          >
          >Or yet another one: make it an iframe.
          >
          ><iframe src="http://www.urltotheoth er.site/cgi/mythingy.php"
          >style="display :none;"></iframe>
          >
          >That'll fool the browser to think it needs to fetch some content from the
          >other site. Thus we have successfully disguised a script to be run as an
          >image or a script or just another page.
          >
          >IMHO, the iframe solution would be the best, cos that's not even fooling the
          >browser. And you can be quite sure that content isn't cahced in that case...
          >If I were you, I'd use the iframe. Just make it small enough, like on pixel
          >wide and heigh, hide it in every possible way using css, and that's it! It
          >gets fetched every time but is invisible to the user...[/color]

          Comment

          • Jerry Stuckle

            #6
            Re: Running PHP from a remote server

            Troy wrote:[color=blue]
            > My ISP provides me with 2 servers: one for normal web hosting
            > (non-PHP) and a CGI server (with PHP). I create my website using
            > fusion 7 and upload this in its entirity to the web hosting server. If
            > I want to run CGI scripts, I can do so with an external link to a page
            > on the CGI server. The problem however is that I have to maintain two
            > sites and all associated links.
            >
            > Ideally, I'd like everything to be in one place, but I'm not allowed
            > to upload my entire site to the CGI server. Alternatively then, is
            > there a way of calling PHP scripts on the CGI server from a non-CGI
            > server, without resorting to a clickable link. I can include HTML such
            > as <A HREF="http://cgiserver/......>php script link<A>, however this
            > requires the user to click on some text to run my script. I'd like to
            > run the script from the remote server without them clicking.[/color]

            Troy,

            Ken's right. Get another host. There are a lot of inexpensive options
            available. You should be easily be able to find something for < $50/yr, or even
            1/2 that if your requirements are minimal.

            Check out www.webhostingtalk.com for discussions about various hosting companies.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • IWP506@gmail.com

              #7
              Re: Running PHP from a remote server

              1and1.com is great. Developer package is $20/month it includes (IIRC)
              4 gb hosting, 50 (not sure) GB bandwidth/month, php, mysql (3
              databases, each up to 100 mb), 5 included domains, 200 (i THINK)
              subdomains, and each additional domain is only 5.99/yr.

              unbelievable deal IMO

              Comment

              • Jerry Stuckle

                #8
                Re: Running PHP from a remote server

                IWP506@gmail.co m wrote:[color=blue]
                > 1and1.com is great. Developer package is $20/month it includes (IIRC)
                > 4 gb hosting, 50 (not sure) GB bandwidth/month, php, mysql (3
                > databases, each up to 100 mb), 5 included domains, 200 (i THINK)
                > subdomains, and each additional domain is only 5.99/yr.
                >
                > unbelievable deal IMO
                >[/color]

                Hmmm, that's a bit expensive. I have a full VPS for $20/mo. It's only 3GB disk
                and 20GB bandwidth - but that's more than I need. And no limit on the number
                of domains, etc. - because I control it all.

                Shared hosting with MySQL and PHP can be found for under $3/mo (less if you pay
                by the year) if you don't require a lot of bandwidth and space. And you can
                move up as your needs increase.

                But some of these are good, some not so good. That's why I recommended
                webhostingtalk. com.

                --
                =============== ===
                Remove the "x" from my email address
                Jerry Stuckle
                JDS Computer Training Corp.
                jstucklex@attgl obal.net
                =============== ===

                Comment

                • Toby Inkster

                  #9
                  Re: Running PHP from a remote server

                  Kimmo Laine wrote:
                  [color=blue]
                  > how about
                  > <script type="text/javascript"
                  > src="http://www.urltotheoth er.site/cgi/mythingy.php"></script>[/color]

                  Which will be ignored by people with Javascript disabled. (5%-15% of
                  people, depending on who you ask.)
                  [color=blue]
                  > or alternatively call it as a src for an image.
                  > <img src="http://www.urltotheoth er.site/cgi/mythingy.php"
                  > style="display: none;">[/color]

                  Which is invalid HTML.

                  --
                  Toby A Inkster BSc (Hons) ARCS
                  Contact Me ~ http://tobyinkster.co.uk/contact

                  Comment

                  • Kimmo Laine

                    #10
                    Re: Running PHP from a remote server

                    "Toby Inkster" <usenet200508@t obyinkster.co.u k> kirjoitti
                    viestissä:bf4ou 2-dig.ln1@ophelia .g5n.co.uk...[color=blue]
                    > Kimmo Laine wrote:
                    >[color=green]
                    >> how about
                    >> <script type="text/javascript"
                    >> src="http://www.urltotheoth er.site/cgi/mythingy.php"></script>[/color]
                    >
                    > Which will be ignored by people with Javascript disabled. (5%-15% of
                    > people, depending on who you ask.)[/color]

                    That's true.
                    [color=blue][color=green]
                    >> or alternatively call it as a src for an image.
                    >> <img src="http://www.urltotheoth er.site/cgi/mythingy.php"
                    >> style="display: none;">[/color]
                    >
                    > Which is invalid HTML.[/color]

                    Invalid how? Please explain, I see nothing wrong in that. Missing some
                    attributes? Okay, alt is required... Anything else? Also, you forgot to
                    mention that this is ignored by people who have images turned of. Which is
                    altogether why I encouraged to use iframe...

                    --
                    SETI @ Home - Donate your cpu's idle time to science.
                    Further reading at <http://setiweb.ssl.ber keley.edu/>
                    Kimmo Laine <eternal.erecti onN0@5P4Mgmail. com>


                    Comment

                    • John Dunlop

                      #11
                      OT - Validity vs Right and Wrong

                      Kimmo Laine wrote:
                      [color=blue]
                      > [Toby Inkster wrote:]
                      >[color=green]
                      > > Kimmo Laine wrote:
                      > >[color=darkred]
                      > > > <img src="http://www.urltotheoth er.site/cgi/mythingy.php"
                      > > > style="display: none;">[/color][/color]
                      >[color=green]
                      > > Which is invalid HTML.[/color]
                      >
                      > Invalid how? Please explain, I see nothing wrong in that.[/color]

                      Validity, in its technical sense, is a dichotomy: it's either Valid
                      or Invalid. If it conforms to the DTD it purports to, it's Valid;
                      otherwise it's Invalid. There's no middle ground.

                      Conformance to the specification, however, is another matter. If a
                      document is Invalid, it can't conform to the spec. If it's Valid,
                      you can find yourself in a grey area, because a document can be Valid
                      without conforming to your, or anyone else's, interpretation of the
                      prose of the spec.

                      The upshot is, rightness and wrongness weren't in question and have
                      no bearing on Validity.

                      --
                      Jock

                      Comment

                      • Toby Inkster

                        #12
                        Re: Running PHP from a remote server

                        Kimmo Laine wrote:
                        [color=blue]
                        > Invalid how? Please explain, I see nothing wrong in that.
                        > Missing some attributes? Okay, alt is required... Anything else?[/color]

                        After you realised that "alt" is required, why didn't you go back and
                        delete the preceding line?

                        Yes, that is how it was invalid.
                        [color=blue]
                        > Also, you forgot to mention that this is ignored by people who have
                        > images turned of.[/color]

                        I didn't forget. I thought about it, but decided against mentioning it as
                        the number of such people is rather low, compared with the number of
                        people with no Javascript.
                        [color=blue]
                        > Which is altogether why I encouraged to use iframe...[/color]

                        If we're going to continue the "some browsers don't support that" and
                        "other browsers do support it but allow it to be disabled" line of
                        reasoning, that ain't ideal either, but it's the best of the three.

                        Probably the best solution would be to simply redirect to the PHP page in
                        question. The preferred method of doing this would be to send an
                        appropriate HTTP 3xx response, but given the problem at hand, I think
                        this would not be viable on this entirely static server.

                        So I'd suggest a timed (about 5 to 10 seconds) <meta> refresh; combined
                        with a Javascript redirect for the odd esoteric browser that doesn't
                        support that particular non-standard, but widely supported HTTP extension;
                        and finished off with a "you will be redirected in a few seconds, but if
                        it doesn't work, please manually follow this link to my <a
                        href='foo'>dyna mic server</a>" message for good measure.

                        --
                        Toby A Inkster BSc (Hons) ARCS
                        Contact Me ~ http://tobyinkster.co.uk/contact

                        Comment

                        • Kimmo Laine

                          #13
                          Re: Running PHP from a remote server

                          "Toby Inkster" <usenet200508@t obyinkster.co.u k> kirjoitti
                          viestissä:9aoou 2-qtu.ln1@ophelia .g5n.co.uk...[color=blue]
                          > Kimmo Laine wrote:
                          >[color=green]
                          >> Invalid how? Please explain, I see nothing wrong in that.
                          >> Missing some attributes? Okay, alt is required... Anything else?[/color]
                          >
                          > After you realised that "alt" is required, why didn't you go back and
                          > delete the preceding line?[/color]

                          Well I didn't think you were actually that anal...
                          [color=blue]
                          > Yes, that is how it was invalid.[/color]

                          Okay. Splitting hair is fun.
                          [color=blue][color=green]
                          >> Also, you forgot to mention that this is ignored by people who have
                          >> images turned of.[/color]
                          >
                          > I didn't forget. I thought about it, but decided against mentioning it as
                          > the number of such people is rather low, compared with the number of
                          > people with no Javascript.
                          >[color=green]
                          >> Which is altogether why I encouraged to use iframe...[/color]
                          >
                          > If we're going to continue the "some browsers don't support that" and
                          > "other browsers do support it but allow it to be disabled" line of
                          > reasoning, that ain't ideal either, but it's the best of the three.
                          >
                          > Probably the best solution would be to simply redirect to the PHP page in
                          > question. The preferred method of doing this would be to send an
                          > appropriate HTTP 3xx response, but given the problem at hand, I think
                          > this would not be viable on this entirely static server.
                          >
                          > So I'd suggest a timed (about 5 to 10 seconds) <meta> refresh; combined
                          > with a Javascript redirect for the odd esoteric browser that doesn't
                          > support that particular non-standard, but widely supported HTTP extension;
                          > and finished off with a "you will be redirected in a few seconds, but if
                          > it doesn't work, please manually follow this link to my <a
                          > href='foo'>dyna mic server</a>" message for good measure.[/color]

                          Yah. That would be the ultimate solution, other than switching to a less
                          crappy server. (which has been recommended also)

                          --
                          SETI @ Home - Donate your cpu's idle time to science.
                          Further reading at <http://setiweb.ssl.ber keley.edu/>
                          Kimmo Laine <eternal.erecti onN0@5P4Mgmail. com>


                          Comment

                          Working...