MY CODE >> PHP BBYOpen Store Search
<!-- Tommy Martin -->
<!-- December 2013 -->
<!-- This is a basic html form that is used to gather data from a user. -->
<!-- The data will be used by PHP to run a query on the Best Buy Open server. -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Untitled Document</title>
 </head>

 <body>
    <center><h1>Best Buy Store Locator App</h1>
        <form action="redirect.php" method="post">
            <input type="hidden" id=txtAPI value="c23jn2pqgz3pbna5df74uwt3" />
            <input type=text name="txtZip" />Enter Zip Code<br><br>
            <input type=text name="txtDistance" />Enter Distance<br><br>
            <input type=submit value="Find Stores" />
        </form>

    </center>
 </body>
</html>
<?
    // Original code written by Richard K. Phillips jr. MS
    // Code modified by Tommy Martin
    // December 2013
    // This code is used to query the Best Buy Open server and receive XML from the query.

    $strZip =$_POST['txtZip'];
    $intDistance = $_POST['txtDistance'];

    header("Location: http://api.remix.bestbuy.com/v1/stores
        (area(" . $strZip . "," . $intDistance . "))
        ?show=name,address,distance,lat,lng&apiKey=fuzgmrj4nv8v9ummatn78m3k");
    ?>