diff --git a/Ruckus/ruckusone.php b/Ruckus/ruckusone.php new file mode 100644 index 0000000..3669f95 --- /dev/null +++ b/Ruckus/ruckusone.php @@ -0,0 +1,86 @@ + "ruckus", + "RequestPassword" => $password, + "APIVersion" => "1.0", + "RequestCategory" => "UserOnlineControl", + "RequestType" => "Authorize", + "UE-MAC" => $_SESSION["client_mac"] + ]; + + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => $_SESSION['url'], + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_SSL_VERIFYPEER => false, + CURLOPT_SSL_VERIFYHOST => false, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS => json_encode($postData), + CURLOPT_HTTPHEADER => array( + 'Content-Type: application/json' + ), + )); + + $response = curl_exec($curl); + + curl_close($curl); + + if ($response !== false) { + $json = json_decode($response, true); + $responseCode = $json['ResponseCode']; + if ($responseCode == 201 || $responseCode == 101) { + header("Location: " . $redirectURL); + } else { + echo "Error: check with your network administrator"; + } + } + else { + die("Error: check with your network administrator"); + } +} + +?> + + + +
+ +Welcome!
+ Please login to our Wifi service