RSS

Category Archives: Web Application

Application Setup on Google App Engine

Run your web apps on Google’s infrastructure.
Easy to build, easy to maintain, easy to scale.

1) Register a free account here https://appengine.google.com/.
2) Create an Application here https://appengine.google.com/start/createapp.
3) Download Google App Engine SDK for Java from here http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Java.
4) Unzip appengine-java-sdk-1.4.2.zip in your favorite drive like “D:\appengine-java-sdk”
5) Now download apps svnmedia.zip “D:\appengine-java-sdk\demos” and unzip here “D:\appengine-java-sdk\demos”
6) Edit application XML file “D:\appengine-java-sdk\demos\svnmedia\war\WEB-INF\appengine-web.xml” to the name of the application like “svnmedia”.
7) Run below commands to upload your application, make sure JDK in system classpath variables 🙂

D:\appengine-java-sdk\bin> cd D:\appengine-java-sdk\bin
D:\appengine-java-sdk\bin> appcfg.cmd update D:\appengine-java-sdk\demos\svnmedia\war

8) Finally you can check your application here http://svnmedia.appspot.com/

Please check features for Google App Engine: http://code.google.com/p/googleappengine/issues/list

Reference:
http://www.builderau.com.au/blogs/
http://www.liventerprise.com/tool/Google_Apps/
http://images.google.com/

http://rcm.amazon.com/e/cm?t=svnlabs09-20&o=1&p=13&l=ur1&category=outlet&banner=1YDJ88YXNCZ632V7HWG2&f=ifr

 

Tags: , , , , ,

Custom Google Search

Google Custom Search service provide customized search for web on your site or blog.

1. We can add site’s links to get fast and relevant search results
2. We can make money with AdSense for Search
3. We can invite friends and community to contribute
4. We can include one or more websites, or specific webpages
5. We can host the search box and results on your own website
6. We can customize the look and feel of the results to match your site

http://www.google.com/cse/

We can make topic / site specific search on google see below

Magento Search Engine

We can integrate custom google search with our site search, we have to add below to our site…

<script type=”text/javascript”>

window.onload = function()
{

jQuery(“.gsc-input”).focus();  // google search input box

jQuery(“.gsc-input”).val(‘<?php echo isset($_REQUEST[‘q’])?$_REQUEST[‘q’]:”; ?>’); // auto fill site’s search keyword to custome search

jQuery(“.gsc-search-button”).click(); // trigger submit event

}

</script>

Waves are my inspiration, not because they rise and fall, but each time they fall They Rise Again… 🙂

 
 

Tags: , , , , , ,

Image Map in FBML

Facebook FBML application does not support hotspots in an image map using dreamweaver.

<div style="position: relative;">
<!-- Hot Spots - Image Map -->
<div id="svnlabs1" style="background: none repeat scroll 0% 0% transparent; cursor: pointer; outline: medium none; text-align: center; vertical-align: middle; position: absolute; top: 72px; left: 460px; z-index: 99; padding: 10px;"></div>
<div id="svnlabs2" style="background: none repeat scroll 0% 0% transparent; cursor: pointer; outline: medium none; text-align: center; vertical-align: middle; position: absolute; top: 11px; left: 635px; z-index: 99; padding: 10px;"></div>
<div id="svnlabs3" style="background: none repeat scroll 0% 0% transparent; cursor: pointer; outline: medium none; text-align: center; vertical-align: middle; position: absolute; top: 170px; left: 632px; z-index: 99; padding: 10px;"></div>
<div id="svnlabs4" style="background: none repeat scroll 0% 0% transparent; cursor: pointer; outline: medium none; text-align: center; vertical-align: middle; position: absolute; top: 78px; left: 887px; z-index: 99; padding: 10px;"></div>
<!-- Main Image -->
<img src="http://blog.svnlabs.com/wp-content/uploads/2009/06/svnlabs.jpg" border="0" alt="" align="absbottom" /></div>

We can use above code to map image using DIV elements on main image.
It is quite useful to insert hotspots on Images in FBML 😉

Maturity is not when we start speaking BIG things But..Actually it is, When we start understanding small things.

 

Tags: , , , ,

PHP ORM – Create select box with mysql set or enum

PHP have rich set of functions to solve real time problems in programming and web development.. thanks to Rasmus Lerdorf

eval — Evaluate a string as PHP code

A SET datatype can hold any number of strings from a predefined list of strings. The ENUM datatype restricts to a single member of the set of predefined strings, the SET datatype allows to store any of the values together, from none to all of them.

CREATE TABLE svnlabs_set (
name SET(‘lamp’,’web’,’linux’,’joomla’)
);

CREATE TABLE svnlabs_enum (
name ENUM(‘lamp’,’web’,’linux’,’joomla’)
);

If we want to fill the html select box with these two tables…

SHOW COLUMNS FROM svnlabs_set;
> set(‘lamp’,’web’,’linux’,’joomla’)

SHOW COLUMNS FROM svnlabs_enum;
> enum(‘lamp’,’web’,’linux’,’joomla’)

now based on column type set list of string values from mysql to php array…

<?php

…….

// if column type is set
$arr = “\$set=”.str_replace(“set”, “array(“, $column[‘Type’]));
eval($arr);

// if column type is enum
$arr = “\$set=”.str_replace(“enum”, “array(“, $column[‘Type’]));
eval($arr);

…………..

?>

Use $set PHP array to fill select box….

 
3 Comments

Posted by on September 5, 2010 in CakePHP, MySQL, Open Source, php, Tips, Web Application

 

Tags: , , , , , , ,

Install geoip on xampp

Geocoding (finding latitude/longitude for street addresses), Geotagging (tagging media with latitude/longitude coordinates), and Geolocation (finding latitude/longitude of computer with IP X-Forwarded-For). There are some options to install on linux environment:

# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# gunzip GeoLiteCity.dat.gz
# sudo mkdir -v /usr/share/GeoIP
# sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat

Install geoip with php5
# sudo apt-get install php5-geoip (ubuntu)

# sudo yum install php5-geoip (centOS)

# sudo pecl install geoip (with PECL)

In Windows environment we have to add extension “php_geoip.dll” with PHP

Download extension from here : http://blog.svnlabs.com/php-5.2.1_geoip-w32.zip

Copy “php_geoip.dll” to xampp “php/ext” .. add a line in php.ini
“extension=php_geoip.dll” and restart xampp

This extension will work on development system using Windows, Apache 2.2.3 and PHP 5.2.10.
We can
check “geoip” with phpinfo() module is loaded.

<?php
$record
= geoip_record_by_name('www.svnlabs.com');
if (
$record) {
print_r($record);
}
?>

Array
(
    [country_code] => US
    [region] => CA
    [city] => Marina...
    [postal_code] =>
    [latitude] => 23.9776792798
    [longitude] => -128.435796741
    [dma_code] => 867
    [area_code] => 400
)

<?php
$result = geoip_record_by_name('78.aaa.yyy.xxx');
var_dump($result);
?>

There is alternative PHP version of the GeoIP API from MaxMind,
but this solution is quite slow on servers. MaxMind uses MaxMind database to display geo locations.
 

Tags: , , , , , , ,

Make your website instantly available in other languages

I think everyone know about google language translation

We can use http://www.wibiya.com/ to translate webpage/blog content in worlds very known languages

Add the free Google Translate gadget to instantly translate your webpage or blog into other languages: English, Afrikaans, Albanian, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Estonian, Filipino, Finnish, French, Galician, Georgian, German, Greek, Haitian Creole, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Irish, Italian, Japanese, Korean, Latvian, Lithuanian, Macedonian, Malay, Maltese, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swahili, Swedish, Thai, Turkish, Ukrainian, Urdu, Vietnamese, Welsh, Yiddish….

Other translation tools
http://babelfish.yahoo.com/
http://www.microsofttranslator.com/
http://www.systran.co.uk/

 
 

Tags: , , , , , ,