title: How to print curret user's address
body: <p>First of all, please apologize my English.</p>
  
  <p>Hi! I need to print with PHP the current user´s address, i have this small script:</p>
  
  <pre><code>&lt;?
    function getaddress($lat,$lng)
    {
       $url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng='.trim($lat).','.trim($lng).'&amp;sensor=false';
       $json = @file_get_contents($url);
       $data=json_decode($json);
       $status = $data-&gt;status;
       if($status=="OK")
       {
         return $data-&gt;results[0]-&gt;formatted_address;
       }
       else
       {
         return false;
       }
    }
  ?&gt;
  
  &lt;?php
    $lat= 21.884766199999998; //latitude
    $lng= -102.2996459; //longitude
    $address= getaddress($lat,$lng);
    if($address)
    {
      echo $address;
    }
    else
    {
      echo "Not found";
    }
  ?&gt;
  </code></pre>
  
  <p>of course it works, but I don't know how to change the $lat and $long variables to the current users location. </p>
  
  <p>In few words; how I can pass the current user lat and long location to the PHP variables to let this script works?</p>