<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Net_UserAgent_Mobile_GPS</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/18108" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/18108">
      <title>Net_UserAgent_Mobile_GPS: Feature/Change Request 18108 [Open] Replace $_GET with $_REQUEST so that POST forms can also work.</title>
      <link>http://pear.php.net/bugs/18108</link>
      <content:encoded><![CDATA[<pre>Net_UserAgent_Mobile_GPS Feature/Change Request
Reported by aiham
2010-12-09T10:13:11+00:00
PHP: 5.1.6 OS: Linux Package Version: 0.1.1

Description:
------------
Hello,
I think it would be useful if you used the $_REQUEST variable rather than $_GET for accessing the GPS position. With this change, you will be able to use POST forms.

I've tested POST forms with Docomo, Softbank and AU phones. The Docomo and Softbank phones both sent the data by POST, resulting in getGPSResponse() returning an array with empty values. AU always sent the GPS position by GET (whether or not the form was post) so there was no problem with it.

The following are lines that I think should be changed:

Docomo.php:122:            $_lat = $_GET['lat'];
Docomo.php:123:            $_lon = $_GET['lon'];
Ezweb.php:114:        $_lat = $_GET['lat'];
Ezweb.php:115:        $_lon = $_GET['lon'];
Softbank.php:125:            $pos  = $_GET['pos'];
Willcom.php:114:        $_lat = $_GET['lat'];
Willcom.php:115:        $_lon = $_GET['lon'];

It would be appreciated if you could make this change.

Regards,
Aiham

Test script:
---------------
/* page1.php */

$gps = Net_UserAgent_Mobile_GPS::factory();
$gps_link = $gps-&gt;getGPSLink('http://www.example.com/page2.php', 'Text');

echo '&lt;form method=&quot;post&quot; action=&quot;'.$gps_link['url'].'&quot; lcs z&gt;&lt;input type=&quot;submit&quot; /&gt;&lt;/form&gt;';

/* page2.php */

$gps = Net_UserAgent_Mobile_GPS::factory();
$location = $gps-&gt;getGPSResponse();
var_dump($_POST);
var_dump($_GET);
var_dump($location);

Expected result:
----------------
=============
SoftBank
=============
$_POST: array(3) {
  [&quot;pos&quot;]=&gt;
  string(27) &quot;N35.40.28.722E139.40.27.825&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;x-acr&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(12) &quot;35.40.28.722&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;139.40.27.825&quot;
}


=============
AU
=============
$_POST: array(0) {
}


----

$_GET: array(12) {
  [&quot;ver&quot;]=&gt;
  string(1) &quot;1&quot;
  [&quot;datum&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;unit&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
  [&quot;alt&quot;]=&gt;
  string(5) &quot;32767&quot;
  [&quot;time&quot;]=&gt;
  string(14) &quot;20101209125055&quot;
  [&quot;smaj&quot;]=&gt;
  string(3) &quot;121&quot;
  [&quot;smin&quot;]=&gt;
  string(2) &quot;95&quot;
  [&quot;vert&quot;]=&gt;
  string(5) &quot;65535&quot;
  [&quot;majaa&quot;]=&gt;
  string(3) &quot;156&quot;
  [&quot;fm&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
}


=============
Docomo
=============
$_POST: array(5) {
  [&quot;lat&quot;]=&gt;
  string(13) &quot;+35.40.34.944&quot;
  [&quot;lon&quot;]=&gt;
  string(14) &quot;+139.40.34.805&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;alt&quot;]=&gt;
  string(7) &quot;+74.000&quot;
  [&quot;x-acc&quot;]=&gt;
  string(1) &quot;2&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(13) &quot;+35.40.34.982&quot;
  [&quot;lon&quot;]=&gt;
  string(14) &quot;+139.40.25.999&quot;
}


Actual result:
--------------
=============
SoftBank
=============
$_POST: array(3) {
  [&quot;pos&quot;]=&gt;
  string(27) &quot;N35.40.28.722E139.40.27.825&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;x-acr&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  bool(false)
  [&quot;lon&quot;]=&gt;
  bool(false)
}


=============
AU
=============
$_POST: array(0) {
}


----

$_GET: array(12) {
  [&quot;ver&quot;]=&gt;
  string(1) &quot;1&quot;
  [&quot;datum&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;unit&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
  [&quot;alt&quot;]=&gt;
  string(5) &quot;32767&quot;
  [&quot;time&quot;]=&gt;
  string(14) &quot;20101209125055&quot;
  [&quot;smaj&quot;]=&gt;
  string(3) &quot;121&quot;
  [&quot;smin&quot;]=&gt;
  string(2) &quot;95&quot;
  [&quot;vert&quot;]=&gt;
  string(5) &quot;65535&quot;
  [&quot;majaa&quot;]=&gt;
  string(3) &quot;156&quot;
  [&quot;fm&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
}


=============
Docomo
=============
$_POST: array(5) {
  [&quot;lat&quot;]=&gt;
  string(13) &quot;+35.40.34.944&quot;
  [&quot;lon&quot;]=&gt;
  string(14) &quot;+139.40.34.805&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;alt&quot;]=&gt;
  string(7) &quot;+74.000&quot;
  [&quot;x-acc&quot;]=&gt;
  string(1) &quot;2&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  NULL
  [&quot;lon&quot;]=&gt;
  NULL
}</pre>]]></content:encoded>
      <description><![CDATA[<pre>Net_UserAgent_Mobile_GPS Feature/Change Request
Reported by aiham
2010-12-09T10:13:11+00:00
PHP: 5.1.6 OS: Linux Package Version: 0.1.1

Description:
------------
Hello,
I think it would be useful if you used the $_REQUEST variable rather than $_GET for accessing the GPS position. With this change, you will be able to use POST forms.

I've tested POST forms with Docomo, Softbank and AU phones. The Docomo and Softbank phones both sent the data by POST, resulting in getGPSResponse() returning an array with empty values. AU always sent the GPS position by GET (whether or not the form was post) so there was no problem with it.

The following are lines that I think should be changed:

Docomo.php:122:            $_lat = $_GET['lat'];
Docomo.php:123:            $_lon = $_GET['lon'];
Ezweb.php:114:        $_lat = $_GET['lat'];
Ezweb.php:115:        $_lon = $_GET['lon'];
Softbank.php:125:            $pos  = $_GET['pos'];
Willcom.php:114:        $_lat = $_GET['lat'];
Willcom.php:115:        $_lon = $_GET['lon'];

It would be appreciated if you could make this change.

Regards,
Aiham

Test script:
---------------
/* page1.php */

$gps = Net_UserAgent_Mobile_GPS::factory();
$gps_link = $gps-&gt;getGPSLink('http://www.example.com/page2.php', 'Text');

echo '&lt;form method=&quot;post&quot; action=&quot;'.$gps_link['url'].'&quot; lcs z&gt;&lt;input type=&quot;submit&quot; /&gt;&lt;/form&gt;';

/* page2.php */

$gps = Net_UserAgent_Mobile_GPS::factory();
$location = $gps-&gt;getGPSResponse();
var_dump($_POST);
var_dump($_GET);
var_dump($location);

Expected result:
----------------
=============
SoftBank
=============
$_POST: array(3) {
  [&quot;pos&quot;]=&gt;
  string(27) &quot;N35.40.28.722E139.40.27.825&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;x-acr&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(12) &quot;35.40.28.722&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;139.40.27.825&quot;
}


=============
AU
=============
$_POST: array(0) {
}


----

$_GET: array(12) {
  [&quot;ver&quot;]=&gt;
  string(1) &quot;1&quot;
  [&quot;datum&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;unit&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
  [&quot;alt&quot;]=&gt;
  string(5) &quot;32767&quot;
  [&quot;time&quot;]=&gt;
  string(14) &quot;20101209125055&quot;
  [&quot;smaj&quot;]=&gt;
  string(3) &quot;121&quot;
  [&quot;smin&quot;]=&gt;
  string(2) &quot;95&quot;
  [&quot;vert&quot;]=&gt;
  string(5) &quot;65535&quot;
  [&quot;majaa&quot;]=&gt;
  string(3) &quot;156&quot;
  [&quot;fm&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
}


=============
Docomo
=============
$_POST: array(5) {
  [&quot;lat&quot;]=&gt;
  string(13) &quot;+35.40.34.944&quot;
  [&quot;lon&quot;]=&gt;
  string(14) &quot;+139.40.34.805&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;alt&quot;]=&gt;
  string(7) &quot;+74.000&quot;
  [&quot;x-acc&quot;]=&gt;
  string(1) &quot;2&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(13) &quot;+35.40.34.982&quot;
  [&quot;lon&quot;]=&gt;
  string(14) &quot;+139.40.25.999&quot;
}


Actual result:
--------------
=============
SoftBank
=============
$_POST: array(3) {
  [&quot;pos&quot;]=&gt;
  string(27) &quot;N35.40.28.722E139.40.27.825&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;x-acr&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  bool(false)
  [&quot;lon&quot;]=&gt;
  bool(false)
}


=============
AU
=============
$_POST: array(0) {
}


----

$_GET: array(12) {
  [&quot;ver&quot;]=&gt;
  string(1) &quot;1&quot;
  [&quot;datum&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;unit&quot;]=&gt;
  string(1) &quot;0&quot;
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
  [&quot;alt&quot;]=&gt;
  string(5) &quot;32767&quot;
  [&quot;time&quot;]=&gt;
  string(14) &quot;20101209125055&quot;
  [&quot;smaj&quot;]=&gt;
  string(3) &quot;121&quot;
  [&quot;smin&quot;]=&gt;
  string(2) &quot;95&quot;
  [&quot;vert&quot;]=&gt;
  string(5) &quot;65535&quot;
  [&quot;majaa&quot;]=&gt;
  string(3) &quot;156&quot;
  [&quot;fm&quot;]=&gt;
  string(1) &quot;1&quot;
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  string(12) &quot;+35.40.37.59&quot;
  [&quot;lon&quot;]=&gt;
  string(13) &quot;+139.40.27.63&quot;
}


=============
Docomo
=============
$_POST: array(5) {
  [&quot;lat&quot;]=&gt;
  string(13) &quot;+35.40.34.944&quot;
  [&quot;lon&quot;]=&gt;
  string(14) &quot;+139.40.34.805&quot;
  [&quot;geo&quot;]=&gt;
  string(5) &quot;wgs84&quot;
  [&quot;alt&quot;]=&gt;
  string(7) &quot;+74.000&quot;
  [&quot;x-acc&quot;]=&gt;
  string(1) &quot;2&quot;
}


----

$_GET: array(0) {
}


----

$location: array(2) {
  [&quot;lat&quot;]=&gt;
  NULL
  [&quot;lon&quot;]=&gt;
  NULL
}</pre>]]></description>
      <dc:date>2010-12-09T10:13:11+00:00</dc:date>
      <dc:creator>aiham &amp;#x61;&amp;#116; p1d &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Net_UserAgent_Mobile_GPS Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
