在网站链接中编码参数的最佳方法是什么?

What is the best way to encode and decode parameters in website link?

I need encode user id by android or ios system and send this parametr to PHP server.

For example: www.example.com/getData.php?uid=[encode id]

Mobiles -> encode
Server -> decode

I am looking for a good algorithm for all platforms (Android, iOS and PHP).

I recommend reading The Comprehensive Guide to URL Parameter Encryption.

Don't Do This:

Don't encrypt URL parameters.

Do This Instead:

Use randomly generated IDs instead.