Jump to content

Featured Replies

Posted

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.

Solved by IPBPowerDev

Go to solution
  • Author

Up 🙂 

  • Author
  • Solution

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 :((( 

Recently Browsing 0

  • No registered users viewing this page.