July
2

a2zVideoAPI Wordpress Plugin: http://blog.svnlabs.com/a2zVideoAPI.zip

http://wordpress.org/extend/plugins/a2zvideoapi/

Plugin Name: a2zVideoAPI widget
Plugin URI: http://svnlabs.com/a2zvideoapi/
Description: a2zVideoAPI allows you to add a sidebar widget to show video from various sites including youtube, dailymotion, google, vimeo, metacafe, blip.tv, hulu, 5min, myspace, ehow, break, flickr etc.
Author: Sandeep Verma
Version: 0.7
Author URI: http://blog.svnlabs.com
Other: Curl must be on your server to use this plugin. This widget tested to latest version of wordpress.

Some API supported URL:
http://www.youtube.com/watch?v=mXMf9GOzzOA
http://www.dailymotion.com/video/x5z91e_lets-play-holi_music
http://video.google.com/videoplay?docid=-7577046582869136330&hl=en
http://www.vimeo.com/9573920
http://www.metacafe.com/watch/4230785/ghetto_star_weekly_randy_radermacher/
http://blip.tv/file/3272712?utm_source=featured_ep&utm_medium=featured_ep
http://www.hulu.com/watch/131066/saturday-night-live-we-are-the-world-cold-open
http://www.viddler.com/explore/coop/videos/54/
http://www.5min.com/Video/How-to-Organize-Your-Life-219728873
http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=51722257
http://vodpod.com/watch/2492783-reactos-install-screencast-tutorial
http://www.ehow.com/video_4983481_change-ip-address-windows-vista.html
http://www.break.com/usercontent/2009/4/How-to-Run-Linux-on-Windows-Ubuntu-699185.html
http://www.atom.com/funny_videos/sw_gangsta_rap_chronicles/
http://www.funnyordie.com/videos/4d47a07835/danny-mendlow-the-solution-to-racism-and-the-biggest-issue-in-the-world
http://www.flickr.com/photos/traceytilson/3033319841/

Installation:

1. Download a2zVideoAPI.zip
2. Extract and upload a2zVideoAPI.php to the plugins/ directory
3. Enable a2zVideoAPI Widget in the Plugin admin panel
4. Place a2zVideoAPI in the sidebar, and edit it to enter the Video URL

Other Links:
http://code.google.com/p/a2zvideoapi/
http://github.com/svnlabs

Download API: http://www.svnlabs.com/a2zvideoapi/a2zVideoAPI.zip
Download Plugin: http://blog.svnlabs.com/a2zVideoAPI.zip

FaceBook Application: http://apps.facebook.com/atozvideoapi/

Follow me:

Facebook: http://www.facebook.com/svnlabs
Twitter: http://www.twitter.com/svnlabs

Subscribe me:
Youtube: http://www.youtube.com/user/svnlabs
Feeds: http://blog.svnlabs.com/feed/

June
12

RESTClient is an application use to visit and test RESTful services.

REST (Representational State Transfer) is the model of the Web to consume web resources. The browser makes a request to a URL and receives a response.  The request may be a GET or POST (or a PUT, DELETE, or HEAD) and the response may be anything HTML, Image file, PDF, XML, JSON etc.

Some RESTful Web Services…

http://www.flickr.com/services/api/

http://code.google.com/p/a2zvideoapi/

RESTClient extension: https://addons.mozilla.org/en-US/firefox/addon/9780

April
30

Welcome to the a2zVideoAPI wiki!

This API supports video links to get video information like Embed Code, Video Thumb, Video Title, Video Description etc.

Some supported video sites:
http://www.youtube.com/watch?v=mXMf9GOzzOA
http://www.dailymotion.com/video/x5z91e_lets-play-holi_music
http://video.google.com/videoplay?docid=-7577046582869136330&hl=en
http://www.vimeo.com/9573920
http://www.metacafe.com/watch/4230785/ghetto_star_weekly_randy_radermacher/
http://blip.tv/file/3272712?utm_source=featured_ep&utm_medium=featured_ep
http://www.hulu.com/watch/131066/saturday-night-live-we-are-the-world-cold-open
http://www.viddler.com/explore/coop/videos/54/
http://www.5min.com/Video/How-to-Organize-Your-Life-219728873
http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=51722257
http://vodpod.com/watch/2492783-reactos-install-screencast-tutorial
http://www.ehow.com/video_4983481_change-ip-address-windows-vista.html
http://www.break.com/usercontent/2009/4/How-to-Run-Linux-on-Windows-Ubuntu-699185.html
http://www.atom.com/funny_videos/sw_gangsta_rap_chronicles/
http://www.funnyordie.com/videos/4d47a07835/danny-mendlow-the-solution-to-racism-and-the-biggest-issue-in-the-world
http://www.flickr.com/photos/traceytilson/3033319841/

How to use a2zVideoAPI:

1. Download “api.php” from http://github.com/svnlabs/a2zVideoAPI

2. API require PHP with CURL extension.. Setup / Upload “api.php” to your web server

3. Modify “api.php” for API Video server
curl_setopt($ch, CURLOPT_URL, ‘http://www.svnlabs.com/a2zvideoapi/server.php’);

4. There are currently 3 formats for API response

a. HTML
b. XML
c. JSON

$post = array( ‘url’ => “http://www.flickr.com/photos/schwartzray/2483697739/”, ‘format’ => “html” );

5. You have to use valid video page url like “http://www.youtube.com/watch?v=mXMf9GOzzOA” with format “html”, “xml” and “json”

6. Enjoy with svnlabs.com

Follow me….

Facebook: http://www.facebook.com/svnlabs
Twitter: http://www.twitter.com/svnlabs

Subscribe me….
Youtube: http://www.youtube.com/user/svnlabs
Feeds: http://blog.svnlabs.com/feed/

April
23

PEAR have rich library to access web based resources easily…

<?php

$sv = new SVTube();
$sv->download(”D7cm-yu-CP0″, “svnlabs.flv”)

?>

Class: SVTube.php
——————————

<?php

require_once ‘HTTP/Client.php’;
require_once ‘HTTP/Request.php’;

class SVTube {

var $req;
var $debug = false;
var $auth = false;

function download ($video_id, $video_filename) {
$url = “http://www.youtube.com/watch?v=”.$video_id;
$this->req =& new HTTP_Request($url);
$response = $this->req->sendRequest();

if (PEAR::isError($response)) {
echo $response->getMessage().”\n”;
} else {
$page = $this->req->getResponseBody();

preg_match(’/\&t=([^"]*)”/si’, $page, $match);

$html=html_entity_decode(urldecode(str_replace(’\x’, ‘%’, $match[1])),ENT_QUOTES, “UTF-8″);

$echo = explode(”&”, $html);

$url = “http://www.youtube.com/get_video?el=detailpage&t=”.$echo[0].”&fmt=5&asv=3&video_id=”.$video_id;

if ($this->debug)
return $url.”\n”;

$req =& new HTTP_Request($url,array (”allowRedirects”=>true, “maxRedirects”=> 99));
$req->setMethod(HTTP_REQUEST_METHOD_GET);
$req->addHeader(”User-Agent”,”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)”);
$response = $req->sendRequest();

$req->getResponseBody();

if (PEAR::isError($response)) {
//echo $response->getMessage().”\n”;
return “Error: Failed to open video file on YouTube\n”;
} else {
if ($o = fopen ($video_filename, “w”)) {
fwrite($o,$req->getResponseBody());
fclose ($o);
return “Download complete! File: “.$video_filename.”\n”;
} else {
return “Error: Failed to open video-file\n”;
}
}

}
}

}
?>

Friends: 1152 Followers: 270
  • Todos

    September 2010
    M T W T F S S
    « Aug    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Archives

  • My Pages

  • What visitors are saying?

  • Way of thinking…

  • What is svnlabs doing…

  • Media Temple