Jump to content

jose.felipe

Member
  • Posts

    3
  • Joined

  • Last visited

About jose.felipe

jose.felipe's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi, Thanks for the code. It may work on your custom page, but what if we havevto do it in a whmcs 'core page' (i.e., a page you cant add these lines of php code)? In the register page, for examp´le?
  2. $postfields = array(); $postfields["action"] = "getclientpassword"; $postfields["userid"] = $uid; //assume you called validatelogin and got the user id $response = whmcs_request($postfields); // make a request to the API $upw = $response['password']; $_SESSION['uid'] = $uid; $_SESSION['upw'] = md5( $uid . $upw . $_SERVER['REMOTE_ADDR']);
  3. hi, I need to integrate whmcs with a 3rd party webservice. So, when the user registers in whmcs, i need to register him into the webservice, and when the user completes an order, i need to register that too in the webservice. In the first case, i created a hook, meant to run after client registration. And for the second case, I developed a module. The problem is: I need to share some files between the hook and the module. I've tried to have one copy of each such file, one in the hooks directory, and other in the modules/servers directories, but it seems that by doing so whmcs includes each file twice(although i use require_once) and I got an error saying i'm redefining some functions. A possible solution would be mantain just one copy of each file, let us say in the modules/servers dir, and then in the hook include the file from there. but that's not working too, i got a error saying that the file could not be included. anyone can tell how the best way to do it?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated