sign in

Create a job

Home | RecentChanges | All Pages | Help

This code uses the PEAR HTTP request.

<?php
require_once "HTTP/Request.php";

$req =& new HTTP_Request("http://heywatch.com/job.xml");
$req->setBasicAuth("johndoe", "foo");
$req->setMethod(HTTP_REQUEST_METHOD_POST);
$req->addPostData("video_id", $video_id);
$req->addPostData("format_id", "31");

if (!PEAR::isError($req->sendRequest())) {
   echo $req->getResponseBody(); // XML response
}
?>

Powered by JunebugWiki v0.0.18 Last edited by bruno on May 08, 2008 09:22 AM (diff)
Version 3 (current) «olderversions