CodeIgniter Forums
Ways to get round using $_REQUEST? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Ways to get round using $_REQUEST? (/showthread.php?tid=21971)



Ways to get round using $_REQUEST? - El Forum - 08-25-2009

[eluser]PHP Creative[/eluser]
Hi there

I have a tracking program that sends data such as latitude, longitude, speed, status,username,password etc to a database using both $_GET and $_POST.

For example every 10 minutes the program automatically sends data via get_data.php?D1=38.898556,-77.037852|310°|0033&D1=45|1,000&D3=FD|18:50&D4=136|rwh7543fd

The program user can also manually post data hence the $_REQUEST. As a test I replaced $_REQUEST with $this->input->post(‘D1’) and it obviously works but my problem arises when the program automatically sends data every 10 minutes via $_GET. Idealy the solution would be to edit how the program sends data but I am unable to this.

My idea was to create a script outside CI that takes the $_REQUEST variables and then redirects to uri_segments.

Any ideas would be much appreciated.

Thanks a million


Ways to get round using $_REQUEST? - El Forum - 08-25-2009

[eluser]renownedmedia[/eluser]
Maybe use a simple script (get_data.php) to handle inserting your data into a database, and only use codeigniter for user interaction via whatever front end you've got for the database.

Invoking CI for your database insertion might be overkill and an unnecessary headache for enabling GET data (tons of segments aren't cool either!)


Ways to get round using $_REQUEST? - El Forum - 08-26-2009

[eluser]Phil Sturgeon[/eluser]
That could work, but CodeIgniter is perfectly about to handle GET and POST values via $this->input->get() and $this->input->post().

Look here to get your query strings working correctly.


Ways to get round using $_REQUEST? - El Forum - 08-27-2009

[eluser]PHP Creative[/eluser]
Thanks very much. Does that function require index.php in the uri or is there a way to exclude in the URI PROTOCOL?