PDA

View Full Version : PHP on MM4


Brandon MUS
04-08-06, 01:15 AM
First, is it possible to run PHP scripts on a MM4 page? (uncompiled if there's any difference in answer).
If yes to 1, then what is required to do so?

If not, is my only option MM5?

Thanks

Brandon

ILoveHostasaurus
04-08-06, 01:24 AM
PHP won't run in Merchant 4 or 5. You can call PHP pages within Merchant 4 if you have OpenUI though. You can use OpenUI tokens to call a PHP URL to include the content that the PHP script produces; you can pass data to it on the URL too, even data supplied by tokens, to customize further. I'm not sure if MM5 has a token allowing you to include remote HTTP content or if a mod of some sort would be necessary.

Brandon MUS
04-08-06, 01:31 AM
Thanks for the response. Can you give me examples of how to call a PHP page through OpenUI? Before I keep pressing on w/ my site designer I have to know I can have complete control of PHP inside of mysql, or else its back to the design table. :D

Brandon

ILoveHostasaurus
04-08-06, 01:45 AM
You'll want section 2.3.3 of http://www.openui.org/docs/pdf/OPEN_TOKENS.pdf

It will give you the syntax for complex calls, and a simple example of:


Example: To call out to http://www.yahoo.com/, use %CALL(http://www.yahoo.com/|GET)%.


So for an easy example, just change www.yahoo.com/ to www.yourdomain.com/file.php and now the output of file.php will be produced in your store pages where you put this token. You can also make POST queries to send data to the php, or just attach them on the URL as GET variables.

Brandon MUS
04-08-06, 01:55 AM
Thank you very much. Its a bit of a work around, but I will definately try that out and see how it works.

Brandon