Category: API
-
how to Change browser url without page reloading with ajax request using JavaScript, HTML5 history API, jQuery, PHP like Facebook, Github navigation menu?
Consider a page that has the following links to three menu items and a div to display the ajax content. <div id=”menu”> <a href=”m1.php” rel=”tab”>menu1</a> | <a href=”m2.php” rel=”tab”>menu2</a> | <a href=”m3.php” rel=”tab”>menu3</a> </div> To override the default action for the link(anchor tag), use the following jQuery code snippet. $(function(){ $(“a[rel=’tab’]”).click(function(e){ //code for the link…
-
Youtube API(Upload video to our website)
First, download Zend Framework…… <?php //debug #error_reporting(E_ALL); //include Zend Gdata Libs require_once(“Zend/Gdata/ClientLogin.php”); require_once(“Zend/Gdata/HttpClient.php”); require_once(“Zend/Gdata/YouTube.php”); require_once(“Zend/Gdata/App/MediaFileSource.php”); require_once(“Zend/Gdata/App/HttpException.php”); require_once(‘Zend/Uri/Http.php’); //yt account info $yt_user = ‘ ‘; //youtube username or gmail account $yt_pw = ‘ ‘; //account password $yt_source = ‘jh’; //name of application (can be anything) //video path $video_url = ‘1.mov’; //yt dev key $yt_api_key = ‘AI39s…’;…
