query string - How can I read a QueryString in CodeIgniter? -


I know that has been asked before, but I need it for affiliate tracking ...

How do I get that parameter and the $ _GET parameter mentioned in that URL?

And yet, sometimes.

A clear example is when you use the API that sends a post-back to your site (PayPal, etc.)

The easiest way, in my opinion, You have to parse a server variable with the GET data required after the $ _GET erase (in my example, there is my GET data in REQUEST_URI.):

  parse_str (strstrchr ($ _ Server) ['REQUEST_URI'], "?"), 1), $ _GET);  

This framework allows the same functionality without requiring a global change in the settings

Here is a usage example.

Pgate Controller {Function Postback () {parse_str (substr (strrchr ($ _ SERVER ['REQUEST_URI'], "?"), 1), $ _GET; $ Receipt = $ this- & gt; Input-> Xss_clean ($ _ GET ['receipt']); }}

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -