5 Replies Latest reply on Jul 12, 2007 9:06 AM by compubrook

    Run PHP without return

    compubrook
      Hi all,

      What is the best way for me to run a example.php? I don't think an HTTP Servce works, but I do not understand why not. The PHP file sends an email through gmail so there isn't an xml file generated or anything, all I want is for Flex to just run the file.


      Incidently, I should include how I figured out how to send email through a gmail account (took me while to find everything so I thought anyone here doing it might benefit from it):

      First, you need to download the openssl binary and search google for phpgmailer. The rest of the method is there.
        • 1. Re: Run PHP without return
          ntsiii Level 3
          navigateToURL()?

          Or proxy the call on the server. Have HTTPService make a call, then have the server run the php page.

          What does a normal HTTPService call do?

          Just brainstorming.

          Tracy
          • 2. Re: Run PHP without return
            Mitek17
            quote:

            Originally posted by: compubrook
            Hi all,

            What is the best way for me to run a example.php? I don't think an HTTP Servce works, but I do not understand why not.


            Why do you think that HTTPService does not work? It has some problems but generally it's OK.
            What is the location of your example.php? Is it on the local/remote Apache server?

            Dmitri.
            • 3. Re: Run PHP without return
              compubrook Level 1
              The example is on a local server.

              Basically, I'm charting live data and I want a warning when one of the data points is above a certain point, in the form of an email. I wrote the php code and everything is working fine, but I cant seem to get the http service call to run it. I have a few other http services working fine (to collect data) but they return an xml file.

              So, if I just want it to just straight up run the http, what do I do?
              • 4. Re: Run PHP without return
                Mitek17 Level 1
                http_srv = new HTTPService();
                http_srv.addEventListener("result", fGetResult);
                http_srv.url = "./php/sample.php";
                http_srv.send();

                This code should work.

                Debugging PHP is a tricky part - did you check error.log and access.log files on you server?
                You can place error_log() statement and check if HTTPService hits php code.


                Dmitri.
                • 5. Re: Run PHP without return
                  compubrook Level 1
                  Mitek, you're exactly right.

                  Thanks for your help.