a2zVideo API

On April 30, 2010, in CURL, Fedora, LAMP, Linux, Open Source, PEAR, PHP, Tips, Tricks, Web Services, by Sandeep Verma

Hits: 110   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.metacafe.com/watch/4230785/ghetto_star_weekly_randy_radermacher/ 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 How to use a2zVideoAPI: 1. Download “api.php” from http://github.com/svnlabs/a2zVideoAPI 2. API require PHP with CURL extension.. Setup [...]

PHP Debug Log – Trace Errors

On April 24, 2010, in Fedora, LAMP, PEAR, PHP, Tips, Tricks, Web Application, by Sandeep Verma

Hits: 304  Hello Friends, I read some where “Quality is not a product.. it is a process ” I think process is hard-work we do and product is final result we get. But how we make our process to get a good product, as a LAMP developer I think track processes “Debug Log” is good sort [...]

Download youtube videos using PEAR

On April 23, 2010, in CURL, Fedora, LAMP, Linux, Open Source, PEAR, PHP, Shared Library, Tips, Tricks, by Sandeep Verma

Hits: 124  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(); [...]

Run Shell Commands from CGI-BIN

On April 23, 2010, in Amazon Cloud EC2 S3, CentOS, Fedora, LAMP, Linux, Open Source, Tips, Tricks, by Sandeep Verma

Hits: 308  Hey, here are some simple steps to run shell commands under cgi-bin using Apache web server (/var/www/cgi-bin), which is configured with cgi access. Apache CGI allows files with executable permission in cgi-bin directory treated as application and run on web browsers. We have to send the MIME type before outputting data to the web [...]

Create WebThumb using LAMP

On April 20, 2010, in Amazon Cloud EC2 S3, CentOS, Fedora, LAMP, Linux, Open Source, Tips, Tricks, Web Application, by Sandeep Verma

Hits: 287  We have to install opera/firefox  first on server. Then install Xvfb for Xvfb virtual framebuffer html2image.sh ………………………. #! /bin/sh /etc/init.d/xvfb start export DISPLAY=:7 DISPLAY=:7 opera –remote ‘openURL(‘$1′)’ & sleep 20 DISPLAY=:7  import -window root $2 /etc/init.d/xvfb stop Uses: # ./html2image.sh  http://www.svnlabs.com   webthumb/svnlabs.png Open FireFox in Xvfb: firefox.sh #!/bin/sh mozilla-firefox -a firefox -remote ‘openURL(‘$1′, new-tab)’ [...]

Create ZIP archives with PHP script and PEAR class

On April 16, 2010, in CakePHP, Fedora, LAMP, Linux, Open Source, PEAR, PHP, Tips, Tricks, by Sandeep Verma

Hits: 227  We can use PEAR to process zip files in PHP using Archive_Zip…. First set PEAR path in php include path using set_include_path Make Zipped file <?php include (‘Archive/Zip.php’);        // include PEAR ZIP package $obj = new Archive_Zip(‘test.zip’);  // zipped file name $files = array(‘svnlabs/1.gif’, ‘svnlabs/resume.doc’, ‘svnlabs/invoice.xls’);   // files add to zip if ($obj->create($files)) { [...]

Stream MP3 using PHP – m3u

On April 11, 2010, in Fedora, LAMP, Linux, PHP, Tips, Tricks, Web Services, by Sandeep Verma

Hits: 256  M3U is a computer file format that stores multimedia playlists. <?php function m3u_stream($dir) { $mp3=””; $siteurl=”http://www.domain.com/mp3/”; $h1 = opendir($dir); while ($file = readdir($h1)) { if ($file == ‘.’ || $file == ‘..’) continue; $mp3.=$siteurl.basename($dir).”/”.$file.”\r\n”; } closedir($h1); return $mp3; } $folder = “svnlabs”; file_put_contents($folder.”.m3u”, m3u_stream($_SERVER["DOCUMENT_ROOT"].”/mp3/”.$folder.”/”)); ?> Here “svnlabs” is a folder where all mp3 files [...]

Class Loading in J2SE Environment

On April 10, 2010, in Java, Tips, Tricks, Web Services, by yes

Hits: 1216  Java Class Loading mechanism is one of the darkest corners inside java virtual machine. The class loading concept describes the behavior of converting a named class into the bits responsible for implementing that class. Wait a minute! “I never have to deal with it. Why do I need to know this bulky philosophy”, this [...]

How can we use PHP to access shared library functions?

On April 6, 2010, in Amazon Cloud EC2 S3, CentOS, Fedora, LAMP, Linux, Open Source, Tips, Tricks, by Sandeep Verma

Hits: 193  PHP function dl() – Loads a PHP extension at runtime <?php // Example loading an extension based on OS if (!extension_loaded(‘svnlabs’)) { if (strtoupper(substr(PHP_OS, 0, 3)) === ‘WIN’) { dl(‘php_svnlabs.dll’); } else { dl(‘svnlabs.so’); } } // Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0 if (!extension_loaded(‘svnlabs’)) { $prefix = (PHP_SHLIB_SUFFIX === ‘dll’) ? ‘php_’ : ”; dl($prefix . ‘svnlabs.’ . PHP_SHLIB_SUFFIX); } ?> We can use linux “nm” or “objdump” command to list symbols in object files… # nm [...]

MySQL Related Search (title+tags+description)

On April 6, 2010, in LAMP, Open Source, PHP, Tips, Tricks, by Sandeep Verma

Hits: 283  What you think? What will be the best option to search related videos in mysql videos table with matching title+tags+description? Very easy Idea! # SELECT * FROM `videos` WHERE title LIKE ‘%$title%’ OR tags LIKE ‘%$tags%’ OR description LIKE ‘%$description’; Full-text Search is a feature introduced to MySQL in version 3.23.23. You have to [...]

Install libpurple with PHP

On April 3, 2010, in CentOS, Fedora, LAMP, Linux, Oscommerce, PHP, Tips, Tricks, Web Application, Web Services, by Sandeep Verma

Hits: 221  libpurple is intended to be the core of an IM program. This libpurple PHP binding, which defines a set of internal classes, gives a possibility to use aol and icq (oscar), yahoo, msn, jabber, irc and much more protocols directly from PHP. Write your own IM chat client in PHP, as simply as PHP [...]

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...