Jump to content

Recommended Posts

Ok, heres my problem

 

currently i am making something which shows information about a specific user contained in a highscore list of an online game (the hiscore list is public)

 

its all working fine, and i currently have a link like:

 

http://mywebsite.com/script.php?user=James

 

But what i am wanting, is instead of having the username in the url, i would like a number, which could then be "converted" into the username using the php code

 

example:

 

http://mywebsite.com/script.php?id=72184546545

 

and then in my php i could have something like:

 

$id = $_GET['id'];
$user = convertbacktostring($id);

 

i would also need another function to convert the string to the id, obviously ;)

 

the reason i want to do this, is because i do not want the username to be visible to other people.

 

 

Please note: I am NOT wanting to use MySQL

 

Thanking you guys :-)

Link to comment
https://forums.phpfreaks.com/topic/82921-convert-integer-to-string/
Share on other sites

Actually, instead of using a MySQL database (which uses server space)

 

i was wanting to generate some kind of code, almost like encryption, but only using numbers, not special characters etc

 

even something simple like asigning each letter in a username a number, for example

 

123 could equal abc, or something to that effect

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.