forked from Arsenal21/software-license-manager
-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a sample php script. included the jquery ui css in the plugin.
- Loading branch information
amin0_000
committed
Sep 24, 2014
1 parent
46ffa1b
commit 79f33e5
Showing
5 changed files
with
1,385 additions
and
157 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
software-license-manager/client-side/sample-php-scripts/create-license.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
// Post URL | ||
$postURL = "http://localhost:81/wp/wp7"; | ||
// The Secret key | ||
$secretKey = "541fc9967d4b43.07908805"; | ||
$firstname = "John"; | ||
$lastname = "Doe"; | ||
$email = "john.doe@gmail.com"; | ||
|
||
// prepare the data | ||
$data = array (); | ||
$data['secret_key'] = $secretKey; | ||
$data['slm_action'] = 'slm_create_new'; | ||
$data['first_name'] = $firstname; | ||
$data['last_name'] = $lastname; | ||
$data['email'] = $email; | ||
|
||
// send data to API post URL | ||
$ch = curl_init ($postURL); | ||
curl_setopt ($ch, CURLOPT_POST, true); | ||
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data); | ||
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); | ||
$returnValue = curl_exec ($ch); | ||
|
||
// Process the return values | ||
//var_dump($returnValue); |
Oops, something went wrong.