CodeIgniter: Use GET Parameters for OAuth or Facebook
Codeignitor destroys your GET parameters, because it does not use it, however for applications that use OAuth, Facebook Applications or Facebook authentication using Facebook connect, GET parameters are required.
In order to retrieve GET parameters from Code Ignitor, first we have to change the config.php, uri_protocol to PATH_INFO, this solves 404 Errors with GET parameters on Codeigniter
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string. The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO' Default - auto detects
| 'PATH_INFO' Uses the PATH_INFO
| 'QUERY_STRING' Uses the QUERY_STRING
| 'REQUEST_URI' Uses the REQUEST_URI
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol'] = "PATH_INFO";
Now in your model or controller you can rebuild the GET parameters using the $_SERVER['QUERY_STRING']
variable.
parse_str($_SERVER['QUERY_STRING'],$_GET);
Now $_GET parameter should be rebuild with GET parameters.
:) 02 Apr, 2010
Related Searches
404 errors with get parameters on codeigniter
facebook application using codeigniter backend
php codeigniter
apache codeigniter allowoverride
show google analytics codeigniter
php page scrape facebook
bootloader is undefined facebook
youtube virus facebook
google dns block facebook
facebook orkut xss tricks
404 errors with get parameters on codeigniter
facebook application using codeigniter backend
php codeigniter
apache codeigniter allowoverride
show google analytics codeigniter
php page scrape facebook
bootloader is undefined facebook
youtube virus facebook
google dns block facebook
facebook orkut xss tricks
CodeIgniter Get Parameters OAuth
Thanks, very helpful!