Wednesday , September 19 2018

Latest Posts

Encode Email Address using php

With this snippet, you can encode any email address into HTML entities so that spam bots do not find it. function encode_email($email=’info@domain.com’, $linkText=’Contact Us’, $attrs =’class=”emailencoder”‘ ) { // remplazar aroba y puntos $email = str_replace(‘@’, ‘@’, $email); $email = str_replace(‘.’, ‘.’, $email); $email = str_split($email, 5); $linkText = str_replace(‘@’, ...

Read More »

Android Gridview

grid1

Android GridView shows items in two-dimensional scrolling grid (rows & columns) and the grid items are not necessarily predetermined but they automatically inserted to the layout using a ListAdapter. An adapter actually bridges between UI components and the data source that fill data into UI Component. Adapter can be used ...

Read More »

Android Transparent Background | Set Opacity in Android | Make android application with transparent background

Using this simple code you can make android application background transparent and in other words you can set opacity in background. Step 1 : In your manifest make that activity theme to Translucent- <activity android:name=“com.w2class.transparent.background.MainActivity” android:theme=“@android:style/Theme.Translucent” android:label=“@string/app_name” > Step 2 : Now your page will be 100% transparent, so if you need ...

Read More »

DETECT LOCATION OF THE USER

Using the below function you can check the city from which the user is visiting your website. function detect_city($ip) { $default = ‘UNKNOWN'; $curlopt_useragent = ‘Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)'; $url = ‘http://ipinfodb.com/ip_locator.php?ip=’ . urlencode($ip); $ch = curl_init(); $curl_opt = array( CURLOPT_FOLLOWLOCATION ...

Read More »