Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Risner:
Mobile Geolocation Apps with Windows Azure Websites Part 1: The PHP Code
Sep 19, 2012 @ 13:14:46

Chris Risner has posted the first part of his series looking at mobile geolocation in PHP-based Azure applications as hosted on the Windows Azure service.

The first article in this mini-series on creating geolocation apps with the backend hosted in Windows Azure Websites is going to be a walkthrough of the PHP code that we’ll host in Windows Azure. The PHP site will be simple and expose just a few methods. Prior to getting into the code for the service, we need to setup a new website in Windows Azure and set up our database.

He walks you through some of the initial steps to create the PHP side of things - setting up the website instance and database, downloading the Silex PHP framework and the PHP code to get process the latitude and longitude of the current user. Also included is code to help find "interesting" points near the user and code to allow the user to add their own.

tagged: tutorial windowsazure azure geolocation mysql silex latitude longitude

Link:

Vancouver Web Consultants Blog:
Getting Time Zone from Latitude & Longitude
May 08, 2009 @ 16:15:30

On the Vancouver Web Consultants blog there's this new tutorial about grabbing latitude and longitude information for a location and determining its current time zone from there.

I was recently tasked with building an application that relied heavily on accurate time zone conversions. I, like many people I soon found out, thought there were just a handful of timezones and the usual select list would suffice. The deeper I looked into the problem, the deeper it got: the list above only shows a few time offsets from UTC, but it doesn't tell me, beyond a shadow of a doubt, exactly what time it is where the user is situated, nor can I rely on that time for calculations in the future. The fact is, here are a LOT of timezones in the world.

He came across the DateTimeZone class PHP has to offer and was happy to see it met his needs. Unfortunately, users weren't always sure what timezone they were in, so he came up with a system combining Google's Maps API and GeoNames.org. He includes the code for both the PHP and Javascript sides (the Javascript requires Mootools, but it could be easily adapted to any other Javascript libraries).

tagged: timezone latitude longitude googlemaps geonames datetimezone

Link:

PHPImpact Blog:
Geo Proximity Search with PHP, Python and SQL
Feb 09, 2009 @ 16:28:29

On the PHP::Impact blog, Federico takes a look at finding geo-proximity to a find a location on a map and plot it and find the distance to another point - all with the help of PHP, Python and SQL.

Basically, what I’m doing is plotting a radius around a point on a map, which is defined by the distance between two points on the map given their latitudes and longitudes. To achieve this I’m using the Haversine formula (spherical trigonometry). This equation is important in navigation, it gives great-circle distances between two points on a sphere from their longitudes and latitudes.

Included in the post is the code for three different implementations - PHP, Python and SQL, all using that same formula.

tagged: geoproximity search python sql haversine radius latitude longitude

Link:

PHP-GTK Community Site:
World map of PHP-GTK developers
Jan 28, 2009 @ 13:55:33

The PHP-GTK Community site has launched a new service to help PHP-GTKers out there find out other developers that might be in their area - a world map (based on Google maps) of other PHP-GTK developers around the world.

I reviewed the coordinates given by existing members and noticed a good number had visibly inverted latitude and longitude; so I inverted them again to place them where it appeared to make more sense (are there really PHP-GTK devs in the middle of the pacific, or near the South pole ?). So you may want to double-check your coordinates to make sure the values are correct, because it's likely I've not found every error.

He's also asking for the Brasil PHP-GTK community to include their information in the map as well as a request for anyone out there that might want to make a "prettier" icon for showing the developers on the map.

tagged: world map phpgtk developer location brasil latitude longitude

Link:

Christopher Jones' Blog:
Location Awareness With Oracle Spatial in PHP
Mar 27, 2008 @ 12:50:11

Christopher Jones has posted a script to his blog today giving an example of how you can use the Spatial functionality of Oracle in a PHP application:

Oracle Spatial is a powerful library for adding location awareness to applications. This script uses the core subset of Spatial, called Oracle Locator, which is included in all Oracle Database editions.

His example connects to the database resource and makes a few example SQL queries: one that uses the sod_nn() function built in to the Spatial package to grab the store locations close to the customers, another that finds the latitude and longitude for a customer's information and a method for querying an object collection of locations in a given area.

tagged: oracle database spatial locator example latitude longitude proximity

Link:

PHP-GTK Community Site:
Locating PHP-GTK developers
Dec 04, 2006 @ 15:58:00

In true tech fashion, the PHP-GTK Community Site is offering a new feature for the users (and viewers) of their site - a geolocation web service that helps you see locations of other site members.

The site offers "geo-nick", a simplistic API to obtain this [latitude and longitude] information coupled with the optional IRC nick field, to allow any developer to create mashups showing community PHP-GTK developers, as identified by nickname (no actual name information is made available through this API) on a map.

The post includes an example of how to use the API - what package to call and what the message should contain. The results are passed back in an array of nickname, lataitude, longitude.

Piggybacking on this new service, they also have a new tutorial showing how to access and use this service from a simple PHP-GTK2 application. It just grabs the results and dumps them into a simple text area in a window.

tagged: locate developer phpgtk2 longitude latitude web service api locate developer phpgtk2 longitude latitude web service api

Link:

PHP-GTK Community Site:
Locating PHP-GTK developers
Dec 04, 2006 @ 15:58:00

In true tech fashion, the PHP-GTK Community Site is offering a new feature for the users (and viewers) of their site - a geolocation web service that helps you see locations of other site members.

The site offers "geo-nick", a simplistic API to obtain this [latitude and longitude] information coupled with the optional IRC nick field, to allow any developer to create mashups showing community PHP-GTK developers, as identified by nickname (no actual name information is made available through this API) on a map.

The post includes an example of how to use the API - what package to call and what the message should contain. The results are passed back in an array of nickname, lataitude, longitude.

Piggybacking on this new service, they also have a new tutorial showing how to access and use this service from a simple PHP-GTK2 application. It just grabs the results and dumps them into a simple text area in a window.

tagged: locate developer phpgtk2 longitude latitude web service api locate developer phpgtk2 longitude latitude web service api

Link:


Trending Topics: