Apparently Linkedin is funny about urlencoding the ~ in https://api.linkedin.com/v1/people/~
my problem is that i use an oauth library so I need to keep things consistent.
is there a way to urlencode just part of the string so in case i have the ~ i can leave that out and put it back in at the same spot after encoding?
thank you
Apparently Linkedin is funny about urlencoding the ~ in https://api.linkedin.com/v1/people/~ my problem is that
Share
Use
rtrim()to remove~and then again append it:This outputs:
[EDIT]: After OP Clarification: If there are
~in the middle somewhereUse
str_replaceto put back the character~:This outputs: