Forked from delraydavis/IDrive-renameFileFolder-REST-API--PHP.php
Created
May 15, 2012 03:52
-
-
Save evsapi/2698994 to your computer and use it in GitHub Desktop.
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 | |
| curl_setopt($ch, CURLOPT_URL, '<SERVER LOCATION>/evs/renameFileFolder'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_POST, true); | |
| $body = 'uid=' . '<USER ID>'. '&pwd=' . '<USER PASSWORD>' . '&pvtkey=' . '<USER DEFINED PRIVATE KEY. ONLY REQUIRED IF ACCOUNT HAS BEEN CONFIGURED TO USE>' . '&oldpath=' . '<PATH TO THE ORIGINAL DESIGNATED FOLDER TO RENAME>' . '&newpath=' . '<PATH TO THE NEW DESIGNATED FOLDER>'; | |
| 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,'<PATH TO CRT FILE>'); | |
| $output = curl_exec($ch); | |
| curl_close($ch); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment