Welcome Guest, Not a member yet? Register   Sign In
In Codeigniter How to FILTER_SANITIZE_URL before redirect to new url
#1

When I click on my google button it sends me to the google links to verify user.

Code:
http://www.example.com/test/google?code=4/uxiEClMAV86scsrjARV-uMRgbypOu1MjT894sXgkAjc#


Once it has reached the link and user has been approved.

How can I use FILTER_SANITIZE_URL so it removes all illegal URL characters before I redirect to new page.

Currently still redirects to url http://localhost/project/# should be http://localhost/project/


PHP Code:
if ($this->input->get('code')) {

if (
$this->googleplus->getAuthenticate()) {

$redirect_uri 'http://' $_SERVER['HTTP_HOST'] . '/project/';

$test filter_var($redirect_uriFILTER_SANITIZE_URL);

redirect($test);

}

There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
In Codeigniter How to FILTER_SANITIZE_URL before redirect to new url - by wolfgang1983 - 06-01-2017, 02:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB