开发者

PHP Session sharing

开发者 https://www.devze.com 2023-02-28 03:44 出处:网络
We use WHMCS for our billing system for our hosting business. WHMCS is written in PHP. As usual, there is the usual login box which reads the DB etc,etc,etc.

We use WHMCS for our billing system for our hosting business. WHMCS is written in PHP. As usual, there is the usual login box which reads the DB etc,etc,etc.

We wish to develop a seperate system to let our customers manage their servers with us (non-billing related things). Is it possible to let the customer loging to WHMCS as usual, then somehow "magically" be allowed access 开发者_开发问答to the new system portal?

Please keep in mind that WHMCS isn't open source so I can't touch this code, however I can run them on the same Apache instance. Also, of course, I'd like to keep security in mind.

Any help is appreciated


Here's an example of how you'd do so:

<?php
require("whmcs/dbconnect.php"); // You may have to change the path here
if ($_SESSION['uid']) {
    echo "whmcs user logged in";
} else {
    echo "whmcs user not yet login";
}
?>
0

精彩评论

暂无评论...
验证码 换一张
取 消