Skip to content

Instantly share code, notes, and snippets.

@cPanelRyan
cPanelRyan / ExampleHookAction.php
Created September 11, 2020 20:18
Hook Action Code: PHP Example
#!/usr/local/cpanel/3rdparty/bin/php -q
<?php
// Get decoded input.
$input = get_passed_data();
// Declare return variables and set their values.
list($result_result, $result_message) = do_something($input);
@cPanelRyan
cPanelRyan / ExampleHookAction.pl
Last active September 11, 2020 20:19
Hook Action Code: Perl Script Example
#!/usr/local/cpanel/3rdparty/bin/perl
# Return errors if Perl experiences problems.
use strict;
use warnings;
# Use objects to handle input.
use IO::Select;
# Properly decode JSON.
@cPanelRyan
cPanelRyan / ExampleHookAction.pm
Last active September 11, 2020 20:19
Hook Action Code: Perl Module Example
# Package this module.
package MyApp::WHM;
# Return errors if Perl experiences problems.
use strict;
use warnings;
# Properly decode JSON.
use JSON;

Keybase proof

I hereby claim:

  • I am cpanelryan on github.
  • I am cpanelryanr (https://keybase.io/cpanelryanr) on keybase.
  • I have a public key ASCNhXE_LVyOX_Rb-PyihDFyDpe4vuk0YOr490VtD_xr9Ao

To claim this, I am signing this object: