Posting string url encoded but need new line

I have a script which sends a post request to a sms gateway api that requires it to be urlencoded

when i do the following:

$message = "Hello \r

the sms comes out “hello rn”

would this be a server side issue or would there be another solution?

i did try using %13%10 but they came out in the sms as well

Keep in mind that url-encoding uses the two-digit hexadecimal representation, so in your case you would use %0D%0A to represent ASCII 13 and 10 respectively.

cheers will give this a go :slight_smile: