Created
April 3, 2011 20:06
-
-
Save mimeoconnect/900720 to your computer and use it in GitHub Desktop.
This is a sample PHP code for adding a new user.
This file contains hidden or 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
| <?php | |
| require_once "rest_client.php"; | |
| //Sandbox | |
| //$root_url = "connect.sandbox.mimeo.com/2010/09/"; | |
| $user_name = "[user name]"; | |
| $password = "[user password]"; | |
| //Live | |
| $root_url = "connect.mimeo.com/2010/09/"; | |
| $user_name = "[user name]"; | |
| $password = "[user password]"; | |
| $rest = new RESTclient($root_url,$user_name,$password); | |
| $inputs = array(); | |
| $inputs["Email"] = "info@dot.com"; | |
| $inputs["Password"] = "password"; | |
| $inputs["FirstName"] = "First Name"; | |
| $inputs["LastName"] = "Last Name"; | |
| $inputs["DaytimePhoneNumber"] = "555-555-5555"; | |
| $url = "AccountService/user?new=true"; | |
| $rest->createRequest($url,"POST",$inputs); | |
| $rest->sendRequest(); | |
| $output = $rest->getResponseBody(); | |
| //echo $output; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment