Bottle: Python Web Framework

Hits: 278  

I really like Bottle: Python Web Framework. Bottle is very simple, fast and powerful Python micro-framework. It is perfect for small web applications and rapid prototyping where you need simple/small API server.

Bottle is a fast, simple and lightweight WSGI micro web-framework for Python.


Install Bottle with pip install bottle or download the source package at PyPI.

Download and Install

Install the latest stable release (Bottle runs with Python 2.7 and 3.3+.)

#pip install bottle


#easy_install -U bottle


download (unstable) into your project directory.


Example: “Hello World” (

from bottle import route, run

def index(name=’World’):
return ‘Hello %s!‘ % name

run(host=’localhost’, port=8080)

Bottle Python

Point your browser to http://localhost:8080/hello/sandeep


Below find simple routing, template, static CDN, Ajax, redirect functions

Test URL for above bottle python code run on port 7800

# python

http://localhost:7800/tpl (“test” is text file on [Web-App-Root])
http://localhost:7800/static/god.jpg (“god.jpg” saved on [Web-App-Root])

Amazon DynamoDB PHP CRUD using aws.phar

Hits: 537  

DynamoDB is fully managed, fast and low cost NoSQL database service by Amazon. DynamoDB allows you to offload the administrative operations and scale highly distributed database cluster.

The AWS SDK PHP enables you to use Amazon Web Services like Amazon S3, EC2, RDS, CloudFront, Redshift, DynamoDB, Push Notification Service (SNS) and more from your PHP code project.

AWS.PHAR Now Download aws-php-sdk Packaged Phar from

# wget

You can also download the packaged phar here

Include the SDK in your PHP project require ‘/path/to/aws.phar’;

Now download simple dynamodb-php-wrapper from here


require_once 'aws.phar';
require_once 'DynamoDBWrapper.php'; 

$ddb = new DynamoDBWrapper(array(
    'region' => 'us-east-1'


$result = $ddb->createTable(‘Session’, ‘UserId::N’);
// Create a table ‘Session’, which has a hash key ‘UserId’ as NUMBER.


$result = $ddb->deleteTable(‘Session’);


$item = array(
‘UserId’ => 1,
‘Name’ => ‘Sandeep’,
$result = $ddb->put(‘Session’, $item);


$key = array(
‘UserId’ => 1,
$update = array(
‘Name’ => array(‘PUT’, ‘SVNLabs’)
$result = $ddb->update(‘Session’, $key, $update);


$key = array(
‘UserId’ => 1,
$result = $ddb->delete(‘Session’, $key);


$keyConditions = array(
‘UserId’ => 1,
$result = $ddb->query(‘Session’, $keyConditions);


$filter = null;

$result = $ddb->scan(‘Session’, $filter, 1000);

Scan with between date filter

$filter = array(
‘userType’ => “member”,
“date” => array(“BETWEEN”, array(“2016/08/01″,”2016/08/17”))
$result = $ddb->scan(“Session”, $filter, 1000);

Other Links

Top 10 Tutorials for your Drupal Website

Hits: 558  

Drupal is one of the most popular and powerful content management systems. Creating your website with Drupal will allow you endless options for design and function. Use these 10 Drupal tutorials to easily give your website features and options you may have never thought possible.

1. Tutorial For Site Setup

Every Drupal website owner should begin with a basic site-building tutorial. The first thing to do, after getting Drupal-compatible web hosting, is to review such a tutorial to create your site’s key elements. This site-setup tutorial will walk you through building your website’s administration menu, site editor, pages, menus, and slideshows.

2. Update Drupal Using Minor Updates and Patches

There are a few types of updates you will come across as a Drupal website owner including, minor, major and patch updates. This tutorial will show you how to keep your installation current to avoid bugs and errors, and maintain the latest module compatibility. Patch updates are often aimed at fixing bugs or security issues and may be released at any time. Minor updates fix site functions errors, and are released less often.

3. Autoloading Awesomeness

This tutorial will show you how to take advantage of autoloading in your visitors web browsers. This is helpful when you want to display video or other media without the user having to click ‘Play.’ Use the Auto-loading Awesomeness tutorial to follow in the steps of major media and social companies who know rely on the feature, such as Facebook and Instagram.

4. Preparing Your Site for Drupal 8

The latest release of Drupal, as of 2017, is Drupal 8. This tutorial will help you get prepared for a major update to any outdated Drupal sites. IT discusses manual site audits, security updates and audit modules. While your updated your Drupal and installing Drupal 8, you should check that you have Drupal optimized web hosting, so that you can make the most of your Drupal installation.

5. Installing and Editing Drupal Themes

This tutorial is perhaps among the most important for any Drupal user. It shows you how to install and modify themes for your Drupal site by giving you the basics on how themes work. After reviewing this tutorial, even a beginner will be able to choose and install a Drupal theme that’s right for their site. Those with just a few minutes on their hands can learn how to change colors, module positions and add or remove elements.

6. Drupal SEO Tutorial

If you’re focused on marketing and Search Engine Optimization, then this is the Drupal tutorial for you. It will teach you how to create SEO-friendly posts, tags, and headers. Beginning with a focus on mobile Drupal templates and themes, this handy guide will ensure your site doesn’t get buried in the search results.

7. Drupal Modules Tutorial

This tutorial is invaluable for those who want to begin developing Drupal modules and backend coding. It will show you how to use Object-Oriented PHP to create Drupal modules with function in the backend of your site and interactive features for your website’s frontend. Some PHP knowledge is required for this tutorial. Object-Oriented PHP will keep your Drupal site coding from being redundant, and save you time behind the keyboard.

8. Use Node.js with Drupal

Many web developers are used to node.js and want full javascript integration on their Drupal based website. This tutorial will teach you to seamlessly integrate the popular node.js package with Drupal to use them inherently together. Using Node.js on your Drupal site will allow you to build web applications that are as scalable as you need them to be. This would work great for any new social media site or mobile application.

9. Create a Custom Slideshow

Slideshows have many purposes on websites, including rotating content to keep the site fresh, and ensuring certain content has a front-page standing. This tutorial will show you how to easily create a slideshow on your Drupal site using theme libraries and the Slick module. It involves some simple HTML markup and Java which you can copy and paste or make modifications to. Your finished product will look great on any business website, and will rotate three or more images or embedded media modules at your desired speed.

10. Loop Over Objects

This tutorial is among the more advanced on the list, but should appeal to anyone with even a little coding background. It will show you how to loop over objects using the built-in tag IteratorAggregate. If you’re looking to get started practicing your PHP skills on a live site, this tutorial is a great choice and will provide convenient, functional results.

Drupal can be used for personal websites, business and corporate sites, and even blogs. It’s a diverse CMS that allows countless customizations. By following these tutorials you will gain a better understanding of your Drupal interfaces, and be able to add creative elements to your website.

Activate Free SSL Certificate for Website – Cloudflare

Hits: 684  

Google will soon shame all websites that are unencrypted also Google count HTTPS for ranking factor. Cloudflare provide Free SSL Certificate in your website DNS system. You just need to edit your DNS records / Name-servers

Cloudflare HTTPS protects website from Security Vulnerabilities and DDoS attacks.

Origin Server (Your Domain) ===== HTTP =====> CloudFlare ===== HTTPS =====> Visitors

Setting up your free Cloudflare Flexible SSL

1. Sign up to

2. Enter your domain name and Begin Scan

3. Verify all Your DNS Records for your domain

4. Select Free Cloudflare Plan then follow all steps

5. Change Your Nameservers in your domain control panel

6. Goto Crypto tab then activate free SSL. Choose Flexible Type.
Cloudflare will take approx 24 hours to activate new SSL certificate.

7. Other Cloudflare settings for caching

8. For wordpress websites add Page Rules in CloudFlare

You can use WordPress Plugins

CloudFlare Flexible SSL


WordPress Force HTTPS

Really Simple SSL

SSL Insecure Content Fixer


Always Online: On, Cache Level: Bypass

Always Online: On, Cache Level: Bypass

Forwarding URL: (Status Code: 301 – Permanent Redirect, Url:$1)

Free SSL

Importing data from non-wordpress mysql database

Hits: 3272  

You have to create an import php file to get the Questions/Answers from a non-wordpress database and bring them into posts in wordpress.

Question Table


/// non-wordpress database connection string here


$results = mysql_query("SELECT * FROM questions");

while ($row = mysql_fetch_assoc($results)) 

    $post_information = array(
	'post_title' => wp_strip_all_tags( $row['question'] ),
	'post_content' => $row['answer'],
	'post_category' =>  array(6,7), // Cat Ids
	'post_date' => date('Y-m-d H:i:s', strtotime( $row['timestamp'] )),
	'post_type' => "post",
	'post_excerpt' => "",
	'post_author' => "admin",
	'post_status' => "publish"
	$post_id = wp_insert_post( $post_information );		
	$filename = "";   ////  Post Thumbnail Image
	$wp_filetype = wp_check_filetype(basename($filename), null );
	$attachment = array(
	  'post_mime_type' => $wp_filetype['type'],
	  'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
	  'post_content' => '',
	  'post_status' => 'inherit'
	$attach_id = wp_insert_attachment( $attachment, $filename, $new_post );
	add_post_meta($post_id, '_thumbnail_id', $attach_id, true);




Hits: 4577  

It’s easy to convert PHP Array to Select Dropdown Box… you need to loop for all element in array to display as dropdown. But may be you ever think for reverse process. Yes, it’s also easy!

You need to scrape / crawl Select box HTML to get PHP Array back from HTML Select Box. Please read our articles for xpath here



$s = '<select name="country">
<option value="">Country...</option>
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AG">Angola</option>
<option value="AI">Anguilla</option>
<option value="AG">Antigua &amp; Barbuda</option>
<option value="AR">Argentina</option>
<option value="AA">Armenia</option>
<option value="AW">Aruba</option>
<option value="AU">Australia</option>
<option value="AT">Austria</option>
<option value="AZ">Azerbaijan</option>
<option value="BS">Bahamas</option>
<option value="BH">Bahrain</option>
<option value="BD">Bangladesh</option>
<option value="BB">Barbados</option>
<option value="BY">Belarus</option>
<option value="BE">Belgium</option>
<option value="BZ">Belize</option>
<option value="BJ">Benin</option>
<option value="BM">Bermuda</option>
<option value="BT">Bhutan</option>
<option value="BO">Bolivia</option>
<option value="BL">Bonaire</option>
<option value="BA">Bosnia &amp; Herzegovina</option>
<option value="BW">Botswana</option>
<option value="BR">Brazil</option>
<option value="BC">British Indian Ocean Ter</option>
<option value="BN">Brunei</option>
<option value="BG">Bulgaria</option>
<option value="BF">Burkina Faso</option>
<option value="BI">Burundi</option>
<option value="KH">Cambodia</option>
<option value="CM">Cameroon</option>
<option value="CA">Canada</option>
<option value="IC">Canary Islands</option>
<option value="CV">Cape Verde</option>
<option value="KY">Cayman Islands</option>
<option value="CF">Central African Republic</option>
<option value="TD">Chad</option>
<option value="CD">Channel Islands</option>
<option value="CL">Chile</option>
<option value="CN">China</option>
<option value="CI">Christmas Island</option>
<option value="CS">Cocos Island</option>
<option value="CO">Colombia</option>
<option value="CC">Comoros</option>
<option value="CG">Congo</option>
<option value="CK">Cook Islands</option>
<option value="CR">Costa Rica</option>
<option value="CT">Cote D\'Ivoire</option>
<option value="HR">Croatia</option>
<option value="CU">Cuba</option>
<option value="CB">Curacao</option>
<option value="CY">Cyprus</option>
<option value="CZ">Czech Republic</option>
<option value="DK">Denmark</option>
<option value="DJ">Djibouti</option>
<option value="DM">Dominica</option>
<option value="DO">Dominican Republic</option>
<option value="TM">East Timor</option>
<option value="EC">Ecuador</option>
<option value="EG">Egypt</option>
<option value="SV">El Salvador</option>
<option value="GQ">Equatorial Guinea</option>
<option value="ER">Eritrea</option>
<option value="EE">Estonia</option>
<option value="ET">Ethiopia</option>
<option value="FA">Falkland Islands</option>
<option value="FO">Faroe Islands</option>
<option value="FJ">Fiji</option>
<option value="FI">Finland</option>
<option value="FR">France</option>
<option value="GF">French Guiana</option>
<option value="PF">French Polynesia</option>
<option value="FS">French Southern Ter</option>
<option value="GA">Gabon</option>
<option value="GM">Gambia</option>
<option value="GE">Georgia</option>
<option value="DE">Germany</option>
<option value="GH">Ghana</option>
<option value="GI">Gibraltar</option>
<option value="GB">Great Britain</option>
<option value="GR">Greece</option>
<option value="GL">Greenland</option>
<option value="GD">Grenada</option>
<option value="GP">Guadeloupe</option>
<option value="GU">Guam</option>
<option value="GT">Guatemala</option>
<option value="GN">Guinea</option>
<option value="GY">Guyana</option>
<option value="HT">Haiti</option>
<option value="HW">Hawaii</option>
<option value="HN">Honduras</option>
<option value="HK">Hong Kong</option>
<option value="HU">Hungary</option>
<option value="IS">Iceland</option>
<option value="IN">India</option>
<option value="ID">Indonesia</option>
<option value="IA">Iran</option>
<option value="IQ">Iraq</option>
<option value="IR">Ireland</option>
<option value="IM">Isle of Man</option>
<option value="IL">Israel</option>
<option value="IT">Italy</option>
<option value="JM">Jamaica</option>
<option value="JP">Japan</option>
<option value="JO">Jordan</option>
<option value="KZ">Kazakhstan</option>
<option value="KE">Kenya</option>
<option value="KI">Kiribati</option>
<option value="NK">Korea North</option>
<option value="KS">Korea South</option>
<option value="KW">Kuwait</option>
<option value="KG">Kyrgyzstan</option>
<option value="LA">Laos</option>
<option value="LV">Latvia</option>
<option value="LB">Lebanon</option>
<option value="LS">Lesotho</option>
<option value="LR">Liberia</option>
<option value="LY">Libya</option>
<option value="LI">Liechtenstein</option>
<option value="LT">Lithuania</option>
<option value="LU">Luxembourg</option>
<option value="MO">Macau</option>
<option value="MK">Macedonia</option>
<option value="MG">Madagascar</option>
<option value="MY">Malaysia</option>
<option value="MW">Malawi</option>
<option value="MV">Maldives</option>
<option value="ML">Mali</option>
<option value="MT">Malta</option>
<option value="MH">Marshall Islands</option>
<option value="MQ">Martinique</option>
<option value="MR">Mauritania</option>
<option value="MU">Mauritius</option>
<option value="ME">Mayotte</option>
<option value="MX">Mexico</option>
<option value="MI">Midway Islands</option>
<option value="MD">Moldova</option>
<option value="MC">Monaco</option>
<option value="MN">Mongolia</option>
<option value="MS">Montserrat</option>
<option value="MA">Morocco</option>
<option value="MZ">Mozambique</option>
<option value="MM">Myanmar</option>
<option value="NA">Nambia</option>
<option value="NU">Nauru</option>
<option value="NP">Nepal</option>
<option value="AN">Netherland Antilles</option>
<option value="NL">Netherlands (Holland, Europe)</option>
<option value="NV">Nevis</option>
<option value="NC">New Caledonia</option>
<option value="NZ">New Zealand</option>
<option value="NI">Nicaragua</option>
<option value="NE">Niger</option>
<option value="NG">Nigeria</option>
<option value="NW">Niue</option>
<option value="NF">Norfolk Island</option>
<option value="NO">Norway</option>
<option value="OM">Oman</option>
<option value="PK">Pakistan</option>
<option value="PW">Palau Island</option>
<option value="PS">Palestine</option>
<option value="PA">Panama</option>
<option value="PG">Papua New Guinea</option>
<option value="PY">Paraguay</option>
<option value="PE">Peru</option>
<option value="PH">Philippines</option>
<option value="PO">Pitcairn Island</option>
<option value="PL">Poland</option>
<option value="PT">Portugal</option>
<option value="PR">Puerto Rico</option>
<option value="QA">Qatar</option>
<option value="ME">Republic of Montenegro</option>
<option value="RS">Republic of Serbia</option>
<option value="RE">Reunion</option>
<option value="RO">Romania</option>
<option value="RU">Russia</option>
<option value="RW">Rwanda</option>
<option value="NT">St Barthelemy</option>
<option value="EU">St Eustatius</option>
<option value="HE">St Helena</option>
<option value="KN">St Kitts-Nevis</option>
<option value="LC">St Lucia</option>
<option value="MB">St Maarten</option>
<option value="PM">St Pierre &amp; Miquelon</option>
<option value="VC">St Vincent &amp; Grenadines</option>
<option value="SP">Saipan</option>
<option value="SO">Samoa</option>
<option value="AS">Samoa American</option>
<option value="SM">San Marino</option>
<option value="ST">Sao Tome &amp; Principe</option>
<option value="SA">Saudi Arabia</option>
<option value="SN">Senegal</option>
<option value="RS">Serbia</option>
<option value="SC">Seychelles</option>
<option value="SL">Sierra Leone</option>
<option value="SG">Singapore</option>
<option value="SK">Slovakia</option>
<option value="SI">Slovenia</option>
<option value="SB">Solomon Islands</option>
<option value="OI">Somalia</option>
<option value="ZA">South Africa</option>
<option value="ES">Spain</option>
<option value="LK">Sri Lanka</option>
<option value="SD">Sudan</option>
<option value="SR">Suriname</option>
<option value="SZ">Swaziland</option>
<option value="SE">Sweden</option>
<option value="CH">Switzerland</option>
<option value="SY">Syria</option>
<option value="TA">Tahiti</option>
<option value="TW">Taiwan</option>
<option value="TJ">Tajikistan</option>
<option value="TZ">Tanzania</option>
<option value="TH">Thailand</option>
<option value="TG">Togo</option>
<option value="TK">Tokelau</option>
<option value="TO">Tonga</option>
<option value="TT">Trinidad &amp; Tobago</option>
<option value="TN">Tunisia</option>
<option value="TR">Turkey</option>
<option value="TU">Turkmenistan</option>
<option value="TC">Turks &amp; Caicos Is</option>
<option value="TV">Tuvalu</option>
<option value="UG">Uganda</option>
<option value="UA">Ukraine</option>
<option value="AE">United Arab Emirates</option>
<option value="GB">United Kingdom</option>
<option value="US">United States of America</option>
<option value="UY">Uruguay</option>
<option value="UZ">Uzbekistan</option>
<option value="VU">Vanuatu</option>
<option value="VS">Vatican City State</option>
<option value="VE">Venezuela</option>
<option value="VN">Vietnam</option>
<option value="VB">Virgin Islands (Brit)</option>
<option value="VA">Virgin Islands (USA)</option>
<option value="WK">Wake Island</option>
<option value="WF">Wallis &amp; Futana Is</option>
<option value="YE">Yemen</option>
<option value="ZR">Zaire</option>
<option value="ZM">Zambia</option>
<option value="ZW">Zimbabwe</option>

$doc = new DOMDocument();
$xpath = new DOMXPath($doc);

$options = $xpath->query('*/select/option');


$values = array();
foreach ($options as $option) {

     $in = $option->getAttribute('value'); 
	 if($in=="") $in = rand(0,2);
	 $values[$in] = $option->textContent;

echo "$"."z = ".var_export($values, true).";";


You can apply same logic for more HTML elements using xpath...

Download Select2Array.php

Install AWStats with GeoIP Plugin

Hits: 7516  

AWStats is a free analytic tool that generates web, streaming, ftp or mail server statistics, graphically. There are many log analyzer but AWStats is open source Web analytics reporting tool, It can analyze log files from Apache, WebStar, IIS.

Installing AWStats on ubuntu 12.04

# apt-get install awstats

Configuring for replace with your real domain

# cp /etc/awstats/awstats.conf /etc/awstats/
# vi /etc/awstats/

Check you have below settings in /etc/awstats/


Generate stats for AWStats for /var/log/apache2/access.log file (Make sure you have fresh log file)

# /usr/lib/cgi-bin/ -update

configuration Apache2 with password

# htpasswd -c /etc/awstats/awstats.pwd admin
# chmod 755 /etc/awstats/awstats.pwd

# vi /etc/apache2/sites-available/awstats

<VirtualHost *:80>
DocumentRoot /var/www
ErrorLog ${APACHE_LOG_DIR}/error_awstats.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access_awstats.log combined
<Directory “/usr/lib/cgi-bin/”>
<Files “”>
Options +ExecCGI
Alias /awstats-icon/ “/usr/share/awstats/icon/”
<Directory /usr/share/awstats/icon>
Options None
AllowOverride All
Order allow,deny
Allow from all
RewriteEngine on
RewriteRule /awstats-icon – [L]
RewriteCond %{QUERY_STRING} !^(.*&)?framename=index(&.*)?$
RewriteCond %{QUERY_STRING} ^(.*&)?framename=.*(&.*)?$
RewriteRule /(.*) /usr/lib/cgi-bin/ [L]
RewriteCond %{QUERY_STRING} ^(.*&)?config=([^&]*)(&(.*))?$
RewriteRule /.* /%2?%1%4 [R,L]
RewriteRule /$ / [R,L]
RewriteRule /([^/]*)(/.*)? /usr/lib/cgi-bin/$1 [QSA,L]
<Location />
SetHandler cgi-script
Satisfy any
Order deny,allow
Deny from all
AuthType Basic
AuthName “AWStats Access”
AuthUserFile /etc/awstats/awstats.pwd
require valid-user
<LocationMatch /(?!|robots.txt)$>
Require user admin
<Location /awstats-icon>
SetHandler None
Allow from all

Enable Virtual Host

# a2ensite awstats
# apache2ctl configtest
# /etc/init.d/apache2 reload

Auto update stats

# crontab -e

*/10 * * * * /usr/share/awstats/tools/
10 03 * * * /usr/share/awstats/tools/
*/10 * * * * /usr/lib/cgi-bin/ -update > /dev/null

Set proper permission on logs

# sudo chmod 644 -R /var/log/apache2/*
# chmod 644 /var/log/apache2

# vi /etc/logrotate.d/apache2   (Replace create 640 root adm with create 644 root adm)

Install GeoIP for AWStats

# apt-get install build-essential zlib1g-dev apg libgeo-ipfree-perl libnet-ip-perl libnet-dns-perl liburi-perl apache2-utils

# cd /usr/src/
# wget
# tar xvzf zlib-1.2.8.tar.gz
# cd zlib-1.2.8
# ./configure –prefix=/usr/local/zlib && make && make install

# wget
# tar xzvf GeoIP-latest.tar.gz
# cd GeoIP-1.6.0
# ./configure && make && make install

# cpan
> install YAML
> install Geo::IP Geo::IPfree Geo::IP::PurePerl URI::Escape Net::IP Net::DNS Net::XWhois Time::HiRes Time::Local
> quit

# cd /usr/src/
# wget
# gzip -d GeoLiteCity.dat.gz
# cp GeoLiteCity.dat /usr/share/GeoIP/GeoLiteCity.dat

Enable AWSTAT configuation for LoadPlugin

# vi /etc/awstats/

Remove comment from /etc/awstats/

LoadPlugin=”geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat”
LoadPlugin=”geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoLiteCity.dat”

# /etc/init.d/apache2 reload

AWStats will run here




Error opening /usr/share/GeoIP/GeoIPCity.dat at /usr/local/share/perl/5.14.2/Geo/IP/ line [file name in /usr/share/GeoIP]

Make sure you have all files in folder /usr/share/GeoIP/GeoLiteCity.dat else copy

# cp /usr/share/GeoIP/GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat


Other log file analysis and reporting tools

Radio Song Album Artwork Cover by YouTube

Hits: 3746  

An album cover is the front / other side of the packaging of a commercially released audio recording product, or album.

You can find online APIs or Websites where artwork available

– Amazon
– LastFM
– Soundcloud
– Apple iTune
– Google Play
– Gracenote
– Free Music Archive

And many more ….

But YouTube is the best source where you can get Album / Song Cover Image for every Title

YouTube provide gdata API to search songs as video title to get image

Deprecated Features for YouTube API v2.0

YouTube Data API (v3)<search term>


$q = isset($_REQUEST['q'])?$_REQUEST['q']:"";

//thumbnail -> sqDefault, hqDefault

// orderby -> title, relevance, published

<div id="videos"></div>
<!-- Include the latest jQuery library -->
<script src=""></script>
<script type="text/javascript">

jQuery.getJSON('<?php echo $q; ?>&max-results=1&v=2&alt=jsonc&orderby=relevance', function(data) {
    var output="<ul>";
    for (var i in {
		output+="<li><img src='" +[i].thumbnail.hqDefault + "' /></li>";
		output+="<li>" +[i].title + "</li>";
	var output="</ul>";


How you can get cover image?

song album artwork

Install Centova Cast

Hits: 4236  

Centova Cast is an internet radio stream hosting control panel. It is used for hosting radio streams and manage Radio Server like ShoutCast and IceCast. You can manage Auto DJ using Centova Cast v2 Auto DJ System plus Server Control Panel.

Centova Cast Admin

System Requirements for Centova Cast: You can install it on any Linux-based servers.

Operating system: CentOS 4/5/6, RHEL, Debian Linux
Database server: MySQL v4.1+, v5.0, v5.1, or v5.5
Streaming server: SHOUTcast v2.0, SHOUTcast v1.9, IceCast v2.x
Streaming source: ices-cc, sc_trans v2.0, ices v2, ices v0.4, ezstream 0.5.3, sc_trans 0.4.0

# apt-get install liblwp-useragent-determined-perl libconfig-tiny-perl libnet-snmp-perl libxml-simple-perl libconfig-simple-perl libmp3lame-dev libxml2-dev

# apt-get install libxml2 libvorbis-dev libogg-dev libxslt1-dev libcurl3-gnutls libogg0 libspeex1 libtheora0 libvorbis0a libxslt1.1

# wget -O
# chmod a+x ./

# ./ –shoutcast-all
# /usr/local/centovacast/sbin/update –add shoutcast1
# apt-get install ia32-libs

# ./ –icecast-all