The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Executing PHP code in QM
#1
These functions can be used to execute PHP code in QM.

Although PHP usually is used in web servers, it also can be used in your computer. You only have to download and install PHP, which is as easy as installing QM or any other program.

Examples:
Code:
Copy      Help
lpstr code=
;shell_exec('notepad');
PhpExec code

Code:
Copy      Help
PhpAddCode "function Add($a, $b) { return $a+$b; }"
int sum=PhpFunc("Add" 1 2)
out sum

Download and import the attached file. Read the first macro...

Current PHP version (5.2.8) does not have activescript. I could not find where it can be downloaded separately. Attached activescript dll of PHP 5.2.6. Download it and move to PHP folder.

SECURITY NOTE: Active script engines can be used in web pages. Some malicious web pages may run PHP on your computer when you open them in your web browser. However this probably is not true with current browsers. I tried PHPScript in web page, in IE and firefox, and it did not run.


Attached Files
.qml   Php.qml (Size: 4 KB / Downloads: 888)
.zip   php5activescript.zip (Size: 17.88 KB / Downloads: 726)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)