Created
April 13, 2012 04:10
-
-
Save kinlane/2373606 to your computer and use it in GitHub Desktop.
IDrive - EVS - REST API - getServerAddress
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
| $uid = "[your IDrive user ID]"; | |
| $pwd = "[your IDrive user password]"; | |
| $crtpath = "[path to your local cert]"; | |
| $url = "https://evs.idrive.com/evs"; | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $url.'/getServerAddress'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_POST, true); | |
| $body = 'uid=' . $uid. '&pwd=' . $pwd; | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $body); | |
| curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8')); | |
| curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE); | |
| curl_setopt($ch,CURLOPT_CAINFO,$crtpath); | |
| $output = curl_exec($ch); | |
| $ServerInfo = new SimpleXMLElement($output); | |
| $Message = $ServerInfo['message']; | |
| $cmdUtilityServer = $ServerInfo['cmdUtilityServer']; | |
| $cmdUtilityServerIP = $ServerInfo['cmdUtilityServerIP']; | |
| $webApiServer = $ServerInfo['webApiServer']; | |
| $webApiServerIP = $ServerInfo['webApiServerIP']; | |
| curl_close($ch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment