User Tag List

Results 1 to 5 of 5

Thread: Executing PHP Code

  1. #1
    No Products Registered

    Join Date
    Dec 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Executing PHP Code

    Search came up with nothing

    I am looking to execute some php code in my mmf2 app

    What would be the easiest way to go about this?

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Executing PHP Code

    If the php code is on a webserver, use the Get Object to visit the php page (and get the result). If it's local php, use the run external command action to run php.exe with the path to the php script as the parameter.

  3. #3
    No Products Registered

    Join Date
    Dec 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Executing PHP Code

    Thanks. Here's the problem though.

    The script is actually a PHP Function, defined as:

    Code:
    function export($addr,$port,$str)
    {
         etc
    }
    I want to call the export() function ingame, but this is a custom PHP function so I would also have to define the function somewhere in the game, right?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Executing PHP Code

    Dynasoft's advice still applies. Just have the php script echo the return of the function.
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Executing PHP Code

    MMF isn't php, so it can't directly call php functions. What you can do is have MMF run a php script with commandline or http get parameters, which then calls the function.

Similar Threads

  1. executing exe within mmf app?
    By Krakerman in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th May 2010, 03:19 AM
  2. Help with executing external program?
    By UKDesign in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st January 2010, 09:26 AM
  3. RGB into Hex code?
    By Game_Master in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th October 2009, 09:37 AM
  4. V-Code Generator Source Code
    By LB in forum File Archive
    Replies: 1
    Last Post: 10th March 2008, 08:52 PM
  5. Executing a program BEFORE IC installation?
    By Kevin in forum Install Creator and Patch Maker
    Replies: 2
    Last Post: 25th August 2006, 04:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •