Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: QuickPHP

  1. #1
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805

    QuickPHP

    QuickPHP allows you to very quickly execute any PHP code in a few seconds, from your desktop.

    It means you don't have to make a new file, run it on localhost or upload to a server, continue editing in a seperate editor etc etc - it can all get time consuming and sometimes you just don't want to bother anymore. With QuickPHP, you can just run the program, write the script and click the button for instant results.

    Example use:


    Clicking "Execute" would execute the code, thus;



    Hopefully that'll give you an example as to how this app can be useful.

    It was compiled with KrakJoe's glorious phpCompile. Here's the actual script itself. (you'll also need the winbinder library).

    (NOT UPDATED, this is old code, scroll down to most recent posts for newest)
    PHP Code:
    <?php
    ob_start
    ();

    include(
    "include/winbinder.php");                 // Location of WinBinder library

    $mainwin wb_create_window(NULLAppWindow"QuickPHP"600493); 

    wb_create_control($mainwinEditBox"",   1010480450,     101WBC_MULTILINE); 
    wb_create_control($mainwinPushButton"Execute",  500108022,     102); 
    wb_create_control($mainwinPushButton"Help/About",  500,358022,     103); 

    wb_set_handler($mainwin"process_main"); 
    wb_main_loop();


    function 
    process_main($window$id)
    {
        switch(
    $id) { 

        case 
    102
            
                
    $getboxvalue wb_get_textwb_get_control$window101 ) );
                
    $getboxvalue str_replace(array("<?php""?>"), ""$getboxvalue);             
                eval(
    $getboxvalue);
                
    $result ob_get_contents();
                
    ob_clean();
                
    $reswin wb_create_window(NULLAppWindow"Output"600493); 
          
    wb_create_control($reswinEditBox$result,   1010570450,     104WBC_MULTILINE); 
                
    wb_set_handler($reswin"process_results");
          
    wb_main_loop();
                
             break; 
             case 
    103:
                
    wb_message_box($window"Simply enter the code you want to test quickly and click \"Execute\". \nPlease note this will execute on your actual system so if you use commands like exec(), unlink(), and others it WILL have effect.\n\nThis isn't meant for executing full scripts, just small ones to see if they work or to quickly generate lists etc.""About QuickPHP");
             break;
            case 
    IDCLOSE:                         // The constant IDCLOSE is predefined 
                
    wb_destroy_window($window);       // Destroy the window
                
    break; 
         }
    }

    function 
    process_results($window$id
    {
           
           switch(
    $id) {
            case 
    IDCLOSE:                         // The constant IDCLOSE is predefined 
                
    wb_destroy_window($window);       // Destroy the window
                
    break;
           }
    }


    ?>
    And here's it pre-compiled:

    (NOT UPDATED, this is old compiled code, scroll down to most recent posts for newest)
    http://rapidshare.com/files/119059358/QuickPHP.zip

    Note: You will need to leave the compiled script in the same directory as the uncompiled script, due to usage of ob_contents() and eval(). I recommend you put it in a directory somewhere in /Program Files/, and make a shortcut to your desktop or elsewhere of the main file.

    If you would like to add anything to the script, please do so in this thread.

    There's no license, but be respectful when using the source. Don't claim it's yours .
    Last edited by themoose; May 31st, 2008 at 10:02.

  2. #2
    Super Moderator hamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to all hamster's Avatar
    Join Date
    Jul 2007
    Location
    Singapore
    Posts
    2,634
    awesome stuff... maybe the recognition thingy? the one that adds color to different stuff in PHP, like variables are green and all that...

  3. #3
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Ah, syntax

    Should be possible.. I'll take a look into it, it might not be very easy though ..

  4. #4
    Jay Street iBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond repute iBrightDev's Avatar
    Join Date
    Oct 2005
    Location
    Not sure, need a GPS.
    Posts
    7,127
    well, my only suggestion is to make it recognize web html so that you can use it to test site code too. save the trouble of installing xampp and turning your home comp into a local server. this would be really cool.
    Full-service digital agency based in Scottsdale, Arizona - iBright Development

  5. #5
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    (OLDER VERSION, this is old code, scroll down to most recent posts for newest)

    Done
    Entire Code:
    PHP Code:
    <?php
    ob_start
    ();
    include(
    "include/winbinder.php"); 
    $mainwin wb_create_window(NULLAppWindow"QuickPHP"600493); 
    wb_create_control($mainwinEditBox"",   1010480450,     101WBC_MULTILINE); 
    wb_create_control($mainwinPushButton"Execute",  500108022,     102); 
    wb_create_control($mainwinPushButton"Help/About",  500,358022,     103); 
    wb_create_control($mainwinComboBox"",  500,608090,  105);
    $a_combo = array("Plain""HTML");
    wb_set_text(wb_get_control($mainwin105), $a_combo);


    wb_set_handler($mainwin"process_main"); 
    wb_main_loop();

    function 
    process_main($window$id)
    {
        switch(
    $id) { 

        case 
    102
            
                
    $getboxvalue wb_get_textwb_get_control$window101 ) );
                
    $getboxvalue str_replace(array("<?php""?>"), ""$getboxvalue); 
                
                eval(
    $getboxvalue);
                
    $result ob_get_contents();
                
    ob_clean();
                
                if(
    wb_get_textwb_get_control$window105 ) ) == "Plain") {
                
            
    $reswin wb_create_window(NULLAppWindow"Output"600493); 
            
    wb_create_control($reswinEditBox$result,   1010570450,     104WBC_MULTILINE); 
            
    wb_set_handler($reswin"process_results");
            
    wb_main_loop();
         
          } elseif(
    wb_get_textwb_get_control$window105 ) ) == "HTML") {
            
    $handle fopen("out.html"'w+');
            
    fwrite($handle$result);
            
    fclose($handle);
            
    wb_exec("out.html");
          } 
             break; 
             case 
    103:
                
    wb_message_box($window"Simply enter the code you want to test quickly and click \"Execute\". \nPlease note this will execute on your actual system so if you use commands like exec(), unlink(), and others it WILL have effect.\n\nThis isn't meant for executing full scripts, just small ones to see if they work or to quickly generate lists etc.""About QuickPHP");
             break;
            case 
    IDCLOSE
                
    wb_destroy_window($window); 
                break; 
         }
    }

    function 
    process_results($window$id
    {
           switch(
    $id) {
            case 
    IDCLOSE:
                
    wb_destroy_window($window);
                break;
           }
    }

    ?>
    (What's changed: ComboBox added with options of Plain or HTML. Plain will be as before, HTML will create the .html file and open it - hopefully in your browser).

    Pre-Compiled:
    http://rapidshare.com/files/119106111/QuickPHPv0.2.zip
    Last edited by themoose; May 31st, 2008 at 11:36.

  6. #6
    Super Moderator hamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to all hamster's Avatar
    Join Date
    Jul 2007
    Location
    Singapore
    Posts
    2,634
    That way you can test your stuff on your company's PC without having to install xampp evils!

    EDIT: How about releasing this as freeware on the net? Maybe rebrand it as QUIKPHP and register QUIKPHP.COM and start your next amazing website

  7. #7
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Indeed! It certainly has it's limitations compared to XAMPP though; it's only one page of code for starters and I haven't tried includes. Includes would probably work, but most likely you'd have to include the direct path - eg include("C:\path\to\file.php"); rather than simply include("file.php");

  8. #8
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    I've noticed it doesn't like HTML code unless it's echo'd by php. Should be fixable.

  9. #9
    Super Moderator hamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to allhamster is a name known to all hamster's Avatar
    Join Date
    Jul 2007
    Location
    Singapore
    Posts
    2,634
    Quote Originally Posted by hamster View Post
    EDIT: How about releasing this as freeware on the net? Maybe rebrand it as QUIKPHP and register QUIKPHP.COM and start your next amazing website
    quoted for attention

  10. #10
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Don't need to brand it... besides, I can't get it to work without including the source. So I'm just releasing it as open source

    Thanks for the idea though.

  11. #11
    #anonymous Decker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond repute Decker's Avatar
    Join Date
    Dec 2003
    Location
    West Yorkshire, Englandshire
    Posts
    10,145
    Nice one Col, get Joe to put it on his site as a great example of what can be done
    /\__/\ We Do Not Forgive!
    (- o *) We Do Not Forget!
    (")_(") Expect Us!
    IT Help for everyone @ Scotia-IT.com - when it's finished

  12. #12
    Hrm? Tree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to all Tree's Avatar
    Join Date
    Aug 2005
    Location
    /home
    Posts
    3,059
    That looks pretty great. Good work. I'll give it a whirl later in the day.
    Life is very short, and there's no time for fussing and fighting my friend.

  13. #13
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Quote Originally Posted by Decker View Post
    Nice one Col, get Joe to put it on his site as a great example of what can be done
    Yep.. he's welcome to! Wouldn't be able without him anyhow!

    Thanks Tree

    ----

    Well, I just fixed it up so that it can parse HTML properly now. I present v0.2.1

    PHP Code:
    <?php
    ob_start
    ();
    include(
    "include/winbinder.php"); 
    $mainwin wb_create_window(NULLAppWindow"QuickPHP"600493); 
    wb_create_control($mainwinEditBox"",   1010480450,     101WBC_MULTILINE); 
    wb_create_control($mainwinPushButton"Execute",  500108022,     102); 
    wb_create_control($mainwinPushButton"Help/About",  500,358022,     103); 
    wb_create_control($mainwinComboBox"",  500,608090,  105);
    $a_combo = array("Plain""HTML");
    wb_set_text(wb_get_control($mainwin105), $a_combo);


    wb_set_handler($mainwin"process_main"); 
    wb_main_loop();

    function 
    process_main($window$id)
    {
        switch(
    $id) { 

        case 
    102
            
                
    $getboxvalue wb_get_textwb_get_control$window101 ) );
                
    $getboxvalue str_replace(array("####<?php""?>####"), """####".trim($getboxvalue)."####");
                
                eval(
    $getboxvalue);
                
    $result ob_get_contents();
                
    ob_clean();
                
                if(
    wb_get_textwb_get_control$window105 ) ) == "Plain") {
            
    $reswin wb_create_window(NULLAppWindow"Output"600493); 
            
    wb_create_control($reswinEditBox$result,   1010570450,     104WBC_MULTILINE); 
            
    wb_set_handler($reswin"process_results");
            
    wb_main_loop();
          } elseif(
    wb_get_textwb_get_control$window105 ) ) == "HTML") {
            
    $handle fopen("out.html"'w+');
            
    fwrite($handle$result);
            
    fclose($handle);
            
    wb_exec("out.html");
          } 
             break; 
             case 
    103:
                
    wb_message_box($window"Simply enter the code you want to test quickly and click \"Execute\". \nPlease note this will execute on your actual system so if you use commands like exec(), unlink(), and others it WILL have effect.\n\nThis isn't meant for executing full scripts, just small ones to see if they work or to quickly generate lists etc.\n\nTo view the output as HTML, choose \"HTML\" from the drop-down.""About QuickPHP");
             break;
            case 
    IDCLOSE
                
    wb_destroy_window($window); 
                break; 
         }
    }

    function 
    process_results($window$id
    {
           switch(
    $id) {
            case 
    IDCLOSE:
                
    wb_destroy_window($window);
                break;
           }
    }

    ?>
    http://rapidshare.com/files/11911012...kPHPv0.2.1.zip

    Basically.. it always messes up if it starts with <?php. So (previously) I did a simple str_replace() where it remvoed all <? tags. This time, I've fixed it so it'll only remove the very first, and very last tags. Everything in between will work fine!

    Again.. report bugs.. suggest features.. even work on it yourself, that's why it's open source .
    Last edited by themoose; May 31st, 2008 at 11:35.

  14. #14
    The Hosting Tool JonnyH is a name known to allJonnyH is a name known to allJonnyH is a name known to allJonnyH is a name known to allJonnyH is a name known to allJonnyH is a name known to allJonnyH is a name known to all JonnyH's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    2,616
    Thats a nice idea Colin. That certainly could help me a lot during certain developments. Rep + Thumbs up.
    ~ The Hosting Tool ~ cPanel WHM/DA Support! cP Creator Importer! Post 2 Host! Fully Automated! ~ thehostingtool.com

  15. #15
    #anonymous Decker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond repute Decker's Avatar
    Join Date
    Dec 2003
    Location
    West Yorkshire, Englandshire
    Posts
    10,145
    I'm trying desperately to think of something I could try it with now!

    What a time to get a mental block
    /\__/\ We Do Not Forgive!
    (- o *) We Do Not Forget!
    (")_(") Expect Us!
    IT Help for everyone @ Scotia-IT.com - when it's finished

Closed Thread

Tags for this Thread

Bookmarks

Posting Permissions

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