MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Counting Virtual Earth Transactions with PHP

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 ...


Go Back   MapPoint Forums > Map Forums > Virtual Earth Blogs

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 03-21-2008
Member
Green Belt
 
Join Date: Sep 2007
Posts: 50
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/counting-virtual-earth-transactions-php-7343.html

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 10:47 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

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!


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46