Jump to content
steph.hope

curl to custom module

Recommended Posts

I've seen in the topic below that if we need to be able to trigger actions remotely we should create an addon module:

Quote

If you want to implement a URL that can run custom code, I would recommend using an addon module with the admin area output or client area output functionality:

However when I create a module and try to do a request to it using curl I get a redirect to login.

Quote

["redirect_url"]=>
  string(123) "https://[my url]/admin/login.php?redirect=%2Fwhmcs%2Fadmin%2Faddonmodules.php%3Fmodule%3Dcustommodule"

How can I get this to work without being redirected?

Share this post


Link to post
Share on other sites

I also tried using the code from the below topic, but all I ended up with was my IP banned for too many failed logins...

 

Share this post


Link to post
Share on other sites

Where you trying to access via https://whmcs.example.com/?m=yourAddonName ?   Using that URL, you don't need logins and such. It uses the client area output function and so might not be what you want exactly if you want admin stuff.   The other way is to use custom pages but it depends on what your end goal is . 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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