Using the function below you would be able to get the HTML code of any webpage. function display_sourcecode($url) { $lines = file($url); $output = “”; foreach ($lines as $line_num => $line) { // loop thru each line and prepend line numbers $output.= “Line #<b>{$line_num}</b> : ” . htmlspecialchars($line) . “<br>\n”; …
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 »SENDING EMAIL WITH MANDRILL
Mandrill is a powerful SMTP provider. Developers tend to use a third party SMTP provider for better inbox deliveries. For the below function you would have to put a file “Mandrill.php” in the same folder as the PHP file you would be using to send emails. function send_email($to_email,$subject,$message1) { require_once ‘Mandrill.php’; $apikey …
Read More »How to send sms using php ?
While working on web or mobile applications, you often face a situation where you need to send an SMS to your user either for login purposes or providing them with some information. The below PHP function would help you with it. For sending SMS using any language, you’d need an …
Read More »What is the difference between include(), include_once() and require_once() ?
The include() statement includes and evaluates a specified line i.e. it will include a file based in the given path. require() does the same thing expect upon failure it will generate a fatal error and halt the script whereas include() will just gives a warning and allow script to continue. …
Read More »What is canvas in HTML 5?
Canvas is an HTML area on which you can draw graphics. <canvas height=""500"" id=""mycanvas"" solid=""style=""border:1px" width=""600""></canvas>
Read More »Download News line Android application
You can download free News Line android application. Click on this link Download Now
Read More »Download Photo Transfer App in .vxp format
You can download free Photo Transfer App in .vxp format. Click on this link Download Now
Read More »How can detact incoming call in android using code ?
Step. 1 : Create android project by selecting file > new > new android application. Now name your app whatever you like. When done hit finish.
Read More »