Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Todd  >  YahooQuest  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example for yahooquest
Class: YahooQuest
Generate links to Mapquest and Yahoo!Maps
Author: By
Last change:
Date: 2006-01-19 11:08
Size: 940 bytes
 

Contents

Class file image Download
<?php
$yq 
= new yahooquest("91 State rt 23","Riverdale","NJ","07457","us");
//returnlink function will return a hyperlink to the respective map
//first argument determines the map you want to use
//$map can be "y" for yahoo or "m" for mapquest "b" returns an array with both map links
echo "<br>Yahoo Maps Link<br>";
echo 
$yq->returnlink("y","200 Old Tappan Road","Old Tappan","NJ","07675");
echo 
"<br>Mapquest Link<br>";
echo 
$yq->returnlink("m","200 Old Tappan Road","Old Tappan","NJ","07675");
echo 
"<br>Both links returned<br>";
$maps $yq->returnlink("b","200 Old Tappan Road","Old Tappan","NJ","07675");
echo 
$maps['mapquest']."<br>";
echo 
$maps['yahoo']."<br>";
//gotomaplink function will redirect the page to the respective map
//uncomment the lines below to h the page redirect
//$yq->gotomaplink("y","200 Old Tappan Road","Old Tappan","NJ","07675");
//$yq->gotomaplink("m","200 Old Tappan Road","Old Tappan","NJ","07675");
?>