#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    2
    Rep Power
    0
    I am working on several projects using PHP and MySQL and two of them will require monitoring incoming data from a source other than a browser, query the MySQL and send data to another non-browser output.

    I would like to do all in PHP, if possible. If not, any suggestions on a language for Linux that has easy interface to MySQL?

    Thanks.
  2. #2
  3. No Profile Picture
    ledjon
    Guest
    Devshed Newbie (0 - 499 posts)
    Use perl or shell scripting.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    Assuming you have some control over the remote applications (the non-browser sources) you can. I have done this many times using programs written in Delphi which talk to php scripts and receive the output all via http. As long as those remote apps can talk http you can write your php to accept queries or other data and send back results or responses.

    HTTP is just a transport protocol and doesn't care if you just send data without all the HTML stuff that browsers want. The remote application has to "POST" the data to the php page (script) which then sees and processes it in just the same way as if the data was "posted" via a form in a browser.

    I have written query programs which do batch queries or batch updates on web based mysql databases. The apps send sql query/update strings and the php issues the query to mysql and then sends the result back to the calling app. There are a couple of tricky things with trapping and substituting or escaping special characters that http interprets so that the http server doesn't get in the way. The ? and = characters come to mind. Knowing the list of special characters will save you some time during development.

    Hope this helps.

    --Richard


    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by prosoft:
    I am working on several projects using PHP and MySQL and two of them will require monitoring incoming data from a source other than a browser, query the MySQL and send data to another non-browser output.

    I would like to do all in PHP, if possible. If not, any suggestions on a language for Linux that has easy interface to MySQL?

    Thanks.
    [/quote]

  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    2
    Rep Power
    0
    The application is all internal to the Linux box except for the browser based initial add/ update to the database.

    The main application is to listen to a input port (serial) and using this data, query the MySQL database, find the approprate records and export the data to another serial port. All on the same machine. Like I said, I would like to do most if not all with PHP except for the device drivers/interface.

    The reference above to Delphi is interesting. Are you talking about Delphi on Windows or Linux?
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    Delphi for Windows. My clients like the dramatically more robust user-interface a Windows app can provide for an interface to their remote (hosted) database driven web sites. I have used Delphi since the first beta and I think it is absolutely fantastic.

    When you said "data from a source other than a browser" I assumed you meant a remote source. PHP isn't designed for the type of application you are talking about however I am not going to say it isn't possible, perhaps it is. From what I have heard Python may be a better choice.


Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 11:45 PM
  2. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 02:14 PM
  3. Pass Perl variable through PHP to browser?
    By dvd in forum Perl Programming
    Replies: 6
    Last Post: January 18th, 2004, 02:37 PM
  4. Format RSS in a web browser using PHP
    By jabba_29 in forum PHP Development
    Replies: 3
    Last Post: January 16th, 2004, 08:20 AM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 02:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo