Block badAgents on site

On December 4, 2010, in CURL, LAMP, Linux, Open Source, PHP, Tips, by Sandeep Verma

Hits: 236  PHP is very powerful language to block bad agents. Below is the code to avoid webspider using PHP in_array(). <?php $badAgents = array(‘Acunetix Web Vulnerability Scanner’, ‘Bot\ mailto:craftbot@yahoo.com’, ‘ChinaClaw’, ‘Custo’, ‘DISCo’, ‘Download\ Demon’, ‘eCatch’, ‘EirGrabber’, ‘EmailSiphon’, ‘EmailWolf’, ‘Express\ WebPictures’, ‘ExtractorPro’, ‘EyeNetIE’, ‘FlashGet’, ‘GetRight’, ‘GetWeb!’, ‘Go!Zilla’, ‘Go-Ahead-Got-It’, ‘GrabNet’, ‘Grafula’, ‘HMView’, ‘HTTrack’, ‘Image\ Stripper’, ‘Image\ Sucker’, ‘Indy\ Library’, ‘InterGET’, ‘Internet\ Ninja’, ‘JetCar’, ‘JOC\ Web\ Spider’, ‘larbin’, ‘LeechFTP’, ‘Mass\ Downloader’, ‘MIDown\ tool’, [...]

a2zVideoAPI WordPress Plugin

On July 2, 2010, in CURL, LAMP, Open Source, PHP, Tips, Tricks, by Sandeep Verma

Hits: 1237  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 [...]

RESTClient – Web Service Consumer

On June 12, 2010, in CURL, LAMP, Open Source, Tips, Tricks, Web Application, Web Services, by Sandeep Verma

Hits: 393  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 [...]

a2zVideo API

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

Hits: 217   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 [...]

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

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...