Bubby4jJoin Date: 2008-12-25 Post Count: 1831 |
I'm working on a project,
What would be the best way to convert a roblox UserID to a roblox Username? (Not in roblox, I'm using PHP, so I would get a page on roblox's site)
Does anyone know of a roblox page specially made for it? Or will I have to get their entire profile page? |
|
aboy5643aJoin Date: 2010-11-20 Post Count: 2785 |
Mustyoshi wanted this the other way around. Just try finding a snippet of the coding in the profile's page that is universal except for the name. Should work with some string manipulating..
~Post here if you're Viet Namese, Canadian or Chinese. I'm from these 3 places. - Some confused kid from Language Center ~ |
|
Bubby4jJoin Date: 2008-12-25 Post Count: 1831 |
Yeah.
I just wish there was a specialised URL, roblox's site pages take forever to load, and doing it 1,263 times won't be fast. |
|
aboy5643aJoin Date: 2010-11-20 Post Count: 2785 |
Oooo yeah... That sucks. I'm sure there's a place where the ID's are kept with the usernames on one page. But I'm sure accessing it would require h4x.
~Post here if you're Viet Namese, Canadian or Chinese. I'm from these 3 places. - Some confused kid from Language Center ~ |
|
|
@aboy
It's called a database, and yes it would require 'hax' to get into it.
@OP
Load their profile page and use getElementById.innerHTML to get their name. |
|
aboy5643aJoin Date: 2010-11-20 Post Count: 2785 |
@trapping
I know T_T
~Post here if you're Viet Namese, Canadian or Chinese. I'm from these 3 places. - Some confused kid from Language Center ~ |
|
gz4Join Date: 2011-05-23 Post Count: 60 |
HEAD /User.aspx?username=name
And read the Location header |
|
Bubby4jJoin Date: 2008-12-25 Post Count: 1831 |
@gz
That would work great for username to userid, but I'm trying to do it the other way around. |
|
|
elucidirJoin Date: 2011-08-08 Post Count: 243 |
I wrote this a while back:
local function getname(id)
return game:GetService"InsertService":GetUserSets(id)[1].CreatorName
end |
|
elucidirJoin Date: 2011-08-08 Post Count: 243 |
The names aren't moderated however, so be aware of that. |
|
elucidirJoin Date: 2011-08-08 Post Count: 243 |
If you want a URI however:
/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d
Then just look for the name in CreatorName%s |
|
Bubby4jJoin Date: 2008-12-25 Post Count: 1831 |
@elucider
That is great! Thank you! |
|