Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PlanetRed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Experience Group
PlanetRed
Commits
ffa7b812
Commit
ffa7b812
authored
15 years ago
by
Matthew Juhl
Browse files
Options
Downloads
Patches
Plain Diff
added lat/lng example script
parent
3b3f546b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/latlon.php
+27
-0
27 additions, 0 deletions
scripts/latlon.php
with
27 additions
and
0 deletions
scripts/latlon.php
0 → 100644
+
27
−
0
View file @
ffa7b812
<?php
/* Example script that shows how we can retrieve lat/lng using the yahoo geocoder API
*
* for a basic example, try: http://path/to/UNL_Elgg/scripts/latlon.php?location=Paris,FR
*
* see http://developer.yahoo.com/maps/rest/V1/geocode.html for more information on the Yahoo Geocode API
*/
$street
=
urlencode
(
$_REQUEST
[
"street"
]);
$city
=
urlencode
(
$_REQUEST
[
"city"
]);
$state
=
urlencode
(
$_REQUEST
[
"state"
]);
$country
=
urlencode
(
$_REQUEST
[
"country"
]);
$zip
=
urlencode
(
$_REQUEST
[
"zip"
]);
$location
=
urlencode
(
$_REQUEST
[
"location"
]);
$req
=
'http://api.local.yahoo.com/MapsService/V1/geocode?appid=2vqgPxLV34EEubUhiFAvT6wlCTgTooVvFVzi5coJ_.3bZHorwlJ8X8_vHW6e4w--&street='
.
$street
.
'&city='
.
$city
.
'&state='
.
$state
.
'&zip='
.
$zip
.
'&country='
.
$country
.
'&location='
.
$location
.
'&output=php'
;
$phpserialized
=
file_get_contents
(
$req
);
$phparray
=
unserialize
(
$phpserialized
);
$resultset
=
$phparray
[
ResultSet
];
$result
=
$resultset
[
Result
];
$Latitude
=
$result
[
Latitude
];
$Longitude
=
$result
[
Longitude
];
echo
"Latitude: "
.
$Latitude
.
" Longitude: "
.
$Longitude
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment