1
Kiwi_Chris
Coding Help
  • 2009/7/3 10:54

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


Hi all,

I have been trying to find some information about how to make a code do the following:

I want a code that with generate a random number
then after the user add's this code to another website,
have the code check that this number was added and if it was
add into the database that it was there.

This is so I can validate users on my site are the holder of an account on another site.

Any ideas on how I could do this.

I thought maybe the formulize module might do this type of thing.

but I have no idea of how I would go about doing this.

Second I notice there are Developers for hire, It would be nice if there was a Thread that allowed people like myself who need small jobs like this one done, that we could ask for help and offer a fee for the work. And the Developers could look there and choose to do such work.

I have other jobs/Projects I would like done also so this would be good for me.

Kind Regards.
Hope someone can help me here.

2
Mamba
Re: Coding Help
  • 2009/7/3 10:57

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


See if this concept would work for you:

https://xoops.org/modules/news/article.php?storyid=4258

If yes, contact Wishcraft to see if he would be for hire...

We also have a location for placing jobs:

http://dev.xoops.org/modules/bounties/

But that Website has to be redone.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
Kiwi_Chris
Re: Coding Help
  • 2009/7/3 11:16

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


Thanks for the reply Mamba,

I think I may not have explained what I need to do very well.

I will try again.

I run a fansite for a online game,
so members of this game, join my site they register with my site, but at this stage they could be pretending to be a player from the online game.

So my thought is, they login to the online game and in there profile there enter a code/number which was created using something like function rand().

Then my code would do something like file_get_content
and verify the data was added.

In this way I could be sure they were that character.

. I tried to register with http://dev.xoops.org but I think they are not taking registrations at the moment.

4
Kiwi_Chris
Re: Coding Help
  • 2009/7/4 2:00

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


bump

5
trabis
Re: Coding Help
  • 2009/7/4 17:16

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You can do this:

Make online site create a md5 hash from user data and a salt key.

Example:
$salt = 'mysecretstring';
$email = $xoopsUser->getVar('email', 'n');

$passid = md5($salt.$email);
echo $passid; //show the id to this user.

Then in the other site you create a form that ask for the passid and the email address.

After form is submit you take the email and the id and you do this:

$salt = 'mysecretstring';
if (md5($salt.$posted_email) == $posted_id){
echo "thanks for being a faithful user!";
} else {
echo "thanks but no thanks!";
}



6
sailjapan
Re: Coding Help

my guess is that Kiwi_Chris isn't the creator of the on-line gaming site and has no way to remake their website. If he had perms to modify the gaming site, why not just add a button only accessible to logged in members that led to a confirmation page on his own site... or something like that. Am I right, Chris?
Never let a man who does not believe something can be done, talk to a man that is doing it.

7
Kiwi_Chris
Re: Coding Help
  • 2009/7/4 22:05

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


I really appreciate the advise, but sailjapan is correct, I have no access to the gaming website, I need all the code to be on my site,

so create a random number/code on my site,
after user pastes to online game
then have my site check to see if x code/number was entered.

8
jegelstaff
Re: Coding Help

Sounds like openID to me. Formulize doesn't really do this kind of thing. The Registration Codes module, a companion to Formulize, lets you have codes that users can use to register for your XOOPS site, and depending on the code, they can be automatically granted immediate access to the website and membership in certain groups.

Perhaps you could make those codes available in a secure way on another website, and then users could use the code to register for the XOOPS site. ie: you would trust that the code has been distributed only to the right people, so you immediately allow them into your XOOPS site, and the code would cause them to be automatically slotted into certain groups in your XOOPS site, which would indicate which part of the other site they had got the code from.

Maybe that would work?

Registration Codes is somewhat complex to setup, but the readme is quite detailed.

If you want to pursue this in more detail, feel free to post on our support forums at http://www.freeformsolutions.ca/formulize

--Julian
Technical Architect - Freeform Solutions
Formulize - custom registration forms, ad hoc forms and reports

9
Kiwi_Chris
Re: Coding Help
  • 2009/7/5 3:44

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


:)

I am starting to realize this is not easy question to explain.
or understand.

I will have another try at explaining.

This is the scenario:

Lets say I play an online game and my character name is "Hulk"

I then go to a fansite (my site) and join the website with username "abc123"
real name "Hulk" aka character name

but then how can we be sure the user that claims to be hulk is hulk??

--------------------------------------

We need characters to show they have access to that character on the game website (not my site),
-----

on the game website (NOT my site) each character has a comments area viewable without logging in.

so I could have a code go to Game Website and look in the comments area, for the number/code.

If its there they are obviously that character, if not the code dies with a fail msg.

10
ghia
Re: Coding Help
  • 2009/7/5 8:09

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


So, your site give people a code. (You can use Trabis code for that in eg a block, which shows on the register page, with a little form that asks for the email address and character name. With a button the calculated code is shown)
The user post it in his personal comments at the game site.
They register at your site, which is set to registering with approuval by administrator.
You verify it and grant their registration.

Login

Who's Online

338 user(s) are online (264 user(s) are browsing Support Forums)


Members: 0


Guests: 338


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits