Welcome Guest, Not a member yet? Register   Sign In
Ways to get round using $_REQUEST?
#1

[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
#2

[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!)
#3

[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.
#4

[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?




Theme © iAndrew 2016 - Forum software by © MyBB