Wednesday 6 August 2014

Get address by using lattitude and longitude Google APi

<?php

echo getAddress("28.6100", "77.2300");

function getaddress($lat,$lng)
{
$url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng='.trim($lat).','.trim($lng).'&sensor=false';
$json = @file_get_contents($url);
$data=json_decode($json);
$status = $data->status;
if($status=="OK")
return $data->results[0]->formatted_address;
else
return false;
}
?>

First Data Global Gateway - Payment gateway integration

lt;?php ini_set('display_errors', '1'); $url = 'https://api.demo.globalgatewaye4.firstdata.com/transaction/v11'; $data = array( "gateway_id" => "xxxxxxx", //YOUR GATEWAY ID "password" => "xxxxxxxx", // YOOUR GATEWAY PASSWORD "transaction_type" => "00", "amount" => "11", "cardholder_name" => "Test", "cc_number" => "4111111111111111", "cc_expiry" => "0314" ); $data_string= json_encode($data); // Initializing curl $ch = curl_init( $url ); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=UTF-8;','Accept: application/json' )); // Getting results $result = curl_exec($ch); // Getting jSON result string $data_string = json_decode($result); if ($data_string) { if ($data_string->bank_resp_code == '100') { print('Approved!'); } else { print($data_string->bank_message); } } else { print($result); } ?>

Facebook embed your website

Instead, I would try this site, iframehost, to install your Iframe and embed your blog.
Log in to Facebook.
Go to this page.
Click “install page tab.”
Choose the business page to which you want to embed your blog.
Click “authorize the tab application.”
In the bottom left-hand corner of the text box that appears, change the drop down menu to “only me.”
Beside “page source” click on “URL” and enter the URL you want to embed.
Change the tab name and image. You will also be able to change these later.
Click “Save Settings” and then allow the application to access your business page.
Go to your business page and check that your tab is working appropriately.

Ref: http://writerswin.com/new-options-to-embed-your-website-on-facebook/