Direct plugin access to connecting socket

Version 1.263

Feature
Finished

The usual method that plugins work, is for DA to run the plugin, take in all of the output until the plugin is done. With that output, insert it into a token and place it into a formatted skin page. This new feature will allow a plugin to run without any of that overhead. When the plugin outputs something via stdout, that data is immediately sent to the user's socket. No directadmin output it sent through the socket at all. With this flexibility, comes the responsibility to send the correct headers as well. The way to tell DA that you want to have full control over the socket, is to rename your script file with the extension ".raw", eg: /usr/local/directadmin/plugins/pluginname/user/script.raw Sample script.raw: #!/bin/sh echo "HTTP/1.1 200 OK"; echo "Content-Type: text/html"; echo ""; echo "hello world<br>"; sleep 1 echo "hello again<br>"; sleep 1 echo "and again<br>"; sleep 1 echo "and again<br>"; exit 0;

Interested to try DirectAdmin? Get a 30-day Free Trial!