I would like some advice about what would be the best practice from a design perspective when tackling this problem:
- I have a website that is currently displaying an "image" generated by google maps.
- This website runs on an Apache web server in Linux.
- I would like to generate my own "image" using my own program (my program.c), not the google maps library.
- My program (my_program.c) is written in in C. I have the option of installing it into the same machine as the Apache web server, or a separate machine.
I need to: 1) somehow call this C program, or preferably a function inside this program (my_program.c) from the PHP code, 2) Access the MySQL database via the C program, and perform some calculations that would ultimately render the image desired 3) Return the results of this process (the image that was generated) to the PHP program so that it can be displayed in the browser.
Any tips would be appreciated.. Thanks.