Community of VE/MapPoint Users and Developers
This is a discussion on Counting Virtual Earth Transactions with PHP within the Virtual Earth Blogs forums, part of the Map Forums category; Those who have a Virtual Earth contract in place and want to count transactions can do so by creating a ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Counting Virtual Earth Transactions with PHP Those who have a Virtual Earth contract in place and want to count transactions can do so by creating a token through a SOAP web service request and attaching it to all subsequent request to the Virtual Earth platform. The process is well explained here for web service request in .NET and Java. If you are using PHP you can follow the sample below. I created this sample for an environment using PHP 5.2.5, NuSoap 0.7.3 and Apache 2.2.8. I’m not using the SOAP-package in PHP directly because there is some issue with digest authentication. Code: //Generate the Token in PHP
getError();
if ($err)
{
die('An error occurred while the WSDL was being accessed: '.$err);
}
$client->setCredentials($vepUID,$vepPWD,'digest');
$client_ip = $_SERVER['REMOTE_ADDR'];
//Display the Client IP-Address
$tokenSpecification = array(
'ClientIPAddress' => $client_ip,
'TokenValidityDurationMinutes' => 480);
$getClientToken = array('specification' => $tokenSpecification);
$res=$client->call('GetClientToken', array('parameters' => $getClientToken));
//Make sure no fault or error has occurred.
if ($client->fault)
{
die('Fault occurred using Web Service: '.print_r($res,true));
}
if ($client->getError())
{
die('An error occurred while using Web Service: '.$client->getError());
}
echo('var token = \''.$res[GetClientTokenResult].'\';');
?>
var map = null;
function GetMap()
{
map = new VEMap('divMap');
//Enable Transaction Counting
map.SetClientToken(token);
//Load the map
map.LoadMap();
}
Once you have the transaction counting in place you can retrieve nice reports which show the transaction by type and allow you comparisons with the previous month:
![]() ![]() Click here to view the article. Last edited by Eric Frost; 03-22-2008 at 03:09 AM. |
![]() |
| ||||
| Posted By | For | Type | Date | |
| httpd.apache.org - How popular is httpd.apache.org? (://URLFAN) | This thread | Refback | 4 Weeks Ago 12:31 AM | |
| Counting Virtual Earth Transactions with PHP - MapPoint Forums | This thread | Refback | 03-26-2008 09:52 AM | |
| Counting Virtual Earth Transactions with PHP - MapPoint Forums | This thread | Refback | 03-26-2008 09:52 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Virtual Earth & SQL Server 2008 - Part 3: Getting Started with Virtual Earth | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 03-02-2008 01:40 PM |
| Virtual Earth API: Implementing Drag and Drop in Virtual Earth | Keith Kinnan's Weblog | Virtual Earth Blogs | 0 | 01-10-2008 04:44 PM |
| Virtual Earth API: How to Create a Full-Screen Virtual Earth Mashup | Keith Kinnan's Weblog | Virtual Earth Blogs | 0 | 01-04-2008 09:27 AM |
| Virtual Earth News from GEOINT 2007: Virtual Earth Appliance | VE For Government | Virtual Earth Blogs | 0 | 10-24-2007 12:10 PM |
| Transactions Consideration | shaistasohail | MapPoint Web Service and Virtual Earth | 1 | 02-09-2006 01:48 PM |
Cheap Flights to Benidorm
Book cheap flights to Benidorm with Holiday Hypermarket. Whether Summer or Winter Benidorm is a great destination.
Spain Holidays
Find and book Spain Holidays with Travel Counsellors. Holiday destinations around the world including Spain.
Turkey Holidays
Istanbul is Turkey's prime attraction as it has the most beautiful mosques and palaces of the country; it has Byzantine churches and Roman temples. Book Turkey Holidays online.
Dubai Holidays
Dubai holidays provide you with exotic sights, desert safaris and superb cuisine. There is an extensive range of things to do and see!
Cheap Portugal Holidays
Want to know what the best time to book cheap Portugal holidays is? Well have a look on ulookubook.com for some useful information to save your cash. Golf, tennis and cycling are all very popular here.
Travel
Check out the travel options on Travel.co.uk.
Cheap Goa Holidays
Experience the world famous Wednesday Flea Market at Anjuna! Book cheap Goa holidays at On The Beach!