Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
IPBPowerDev Posted March 30, 2021 Posted March 30, 2021 Hello, I try to make an external auth system for an other PHP Script directly linked to my forum but i have an error because when a password contain a special character like ('ç"&éçàç&#.? , it will not send the special character in the API request, here is my api Request for external user creation: $curl = curl_init(); curl_setopt ($curl, CURLOPT_URL, "https://mydomain.com/api/index.php?/core/members&name=$nameIPS&email=$mailIPS&password=$passIPS&group=$group&validated=$valid"); curl_setopt_array( $curl, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_USERAGENT => "MyUserAgent/1.0", CURLOPT_USERPWD => "{$apiKey}:" ) ); curl_setopt($curl, CURLOPT_POST, true); $response = curl_exec( $curl ); curl_close($curl); If my $passIPS contain a special character, there will be a problem and the password entered will not be the same, because there will not be certain characters. I would like a solution to solve this error and be able to send any type of character in my request. Regards and Thank in advance for your help.
Solution IPBPowerDev Posted April 2, 2021 Author Solution Posted April 2, 2021 Ok i fixed it. I just made a variable: $pass = urlencode(thepassword); to fix it 🙂 , by using urlencode, it will encode the pass to avoid special characters. I'm just retarded :(((
Recommended Posts