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\n"

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