forked from JonTheWong/whmcs_autoauth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqauth.php
More file actions
22 lines (18 loc) · 787 Bytes
/
qauth.php
File metadata and controls
22 lines (18 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/*
Created by JonTheWong @ Zenith Media Canada - www.zenithmedia.ca
Visit our public repo - https://github.com/JonTheWong/whmcs-autoauth-invoice
*/
$whmcsurl = "https://zenithmedia.ca/portal/dologin.php"; /* replace with your url */
$autoauthkey = "REPLACE-WITH-SYSTEM-KEY"; /* same as in configuration.php */
$secretkey = "REPLACE-THIS-PART-WITH-SECRET-KEY"; /* generate a new key for this script */
if (md5($_GET['email'].$secretkey) != $_GET['zmkey'])
die('Visit https://zenithmedia.ca/login/ to login manually');
$email = $_GET['email'];
$timestamp = time();
$hash = sha1($email.$timestamp.$autoauthkey);
$goto = "viewquote.php?id=".$_GET['quote'];
$url = $whmcsurl."?email=$email×tamp=$timestamp&hash=$hash&goto=".urlencode($goto);
header("Location: $url");
exit;
?>