sign in

Transfer a video to HeyWatch

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/download.xml");
$req->setBasicAuth("johndoe", "foo");
$req->setMethod(HTTP_REQUEST_METHOD_POST);
$req->addPostData("url", $video_url);
$req->addPostData("title", $video_title);

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:23 AM (diff)
Version 2 (current) «olderversions