mrascii Posted December 31, 2011 Share Posted December 31, 2011 For some reason, everytime whmcs suspend an account, I need to reach a script, let's say http://mywebsite.com/sms.cgi?server=$whm_host&account=$account Where $whm_host value is the server hostname where the suspended account is reside and $account value is the suspended username. But the following code failed to do what I want, I checked mywebsite.com log and seems that the whmcs hooks only reached http://mywebsite.com/sms.cgi?server=&account= which is mean the script failed to get the both server hostname and suspended username value. Anybody can help me? Sorry, I'm PHP newbie. Here's the code I placed into includes/hooks dir. <?php define("ACTIONHOOKSINC",true); add_hook("AfterModuleSuspend",1,"actionhook_AfterModuleSuspend"); function actionhook_AfterModuleSuspend($vars) { $whm_host = $_SERVER['HTTP_HOST']; $account = $vars["username"]; $result = file_get_contents('http://mywebsite.com/sms.cgi?server=$whm_host&account=$account'); } ?> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.