OK, I did some diggin in the forum but from what I read, the answer to my problem is either
1. It can't be done.
or
2. Need to echo a variable off of PHP and retrieve it via ajax
I just want to explain that first so that people don't tell me to search the forum, but I think my case is a bit different than others because of one thing: the game is gonna be hosted on the client's site.
so, in the client's site there will be a variable called userid, and this variable is gonna be stored on the site's local storage (in javascript), and the game is going to be hosted on the same site, so the client want this variable to be retrieved by the game (to do stuffs but this time, it's high score post to database).
so my question is: if the game is hosted on the same site, can I retrieve the site's local storage using construct 2's local storage object?
any help is appreciated.