Jump to content

Website Integration Problem


MrDevon

Recommended Posts

Hi, im not sure if this is in the right forum but here goes, what im trying to do is get my main site to detect if customer is logged in but my WHMCS is on a subdomain so i cannot read the cookies directly as i want to use an API call to get all the clients details so the user has a customer center on the main website aswell as whmcs.

 

I have tried this just as an example (derived from WHMCS documentation) to try and determine login state and then change the location accordingly

res=true/res=false.

(File: loginchq.php)

if ($_SESSION['uid']) {
	header( 'Location: http://www.mysite.com/v3/index.php?act=login&res=true' );
} else {
	header( 'Location: http://www.mysite.com/v3/index.php?act=login&res=false' );
}

 

To get to this ive added a file in my whmcs root which is were my Client login screen goes to - http://my.mysite.com/index.php?goto=loginchq. But no matter what i do it always returns as not logged in even though when i access my whmcs it has logged me in.

 

Can any one suggest any way around this?

 

Thanks

Devon

Link to comment
Share on other sites

  • 4 weeks later...

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