Follow us on Twitter!
Hacking isn't just Computers & Exploits. It's a Philosophy. - Mr_Cheese
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 30
Guests Online: 28
Members Online: 2

Registered Members: 82825
Newest Member: bulmers
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 09-09-08 12:15
Heya sorry to bother everyone again.
How would I make a unique refference number in PHP?


Author

RE: Refference number using PHP

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 09-09-08 12:25
http://www.webmasterworld.com/forum88/4899.htm


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 09-09-08 12:30
Cheers. I did have a look at that. But i didnt know if anyone knew a better way of doing it.


Ty though Smile


Author

RE: Refference number using PHP

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 09-09-08 12:31
I would probably say that going with the uniqueID and random are the choices I would go with, But don't quote me, I've only been doing php for about 4 days now.


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: Refference number using PHP

spyware
Member



Posts: 4192
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 09-09-08 13:10
yours31f wrote:I've only been doing php for about 4 days now.


Lies.




Ssssh, just, shut it. Lies. You know it.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
[/s
http://bitsofspy.net
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 09-09-08 13:30
hahah ty yours31f and lol


Author

RE: Refference number using PHP

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 09-09-08 15:20
Actually your right spyware, its only been three days.


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: Refference number using PHP

Parker
Member



Posts: 77
Location: England, UK
Joined: 26.11.07
Rank:
Newbie
Posted on 09-09-08 20:18
You're*


[img]http://i19.photobucket.com/albums/b153/Golden_Lemur/parkersig.png [/img]


Cheers Lemur


The Ultimate security will not protect you, it is your understanding of reality that will. - ZoDoom

The 1st thing to do, is to have "certainty" that it is not a hardware problem! - RootsBabilonia
silance@hotmail.co.uk
Author

RE: Refference number using PHP

spyware
Member



Posts: 4192
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 09-09-08 20:22
Parker wrote:
You're*


It's*



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
[/s
http://bitsofspy.net
Author

RE: Refference number using PHP

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 09-09-08 21:57
spyware wrote:
Parker wrote:
You're*


It's*


wow, nice come back spy, run out of jokes for the day?


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 09-09-08 21:59
look at the rand(); function
http://uk3.php.ne. . .
or unique id
http://fr.php.net. . .uniqid.php
Or you can create your own function if you want to use letters with numbers.




Edited by on 09-09-08 22:00
Author

RE: Refference number using PHP

spyware
Member



Posts: 4192
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 09-09-08 22:02
yours31f wrote:
wow, nice come back spy, run out of jokes for the day?


Nope, don't worry one bit :+.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
[/s
http://bitsofspy.net
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 01:31
DarkMantis wrote:
How would I make a unique refference number in PHP?

Explain what you mean by "unique reference number", and we'll know which "right" answer to give you.

yours31f wrote:
wow, nice come back spy, run out of jokes for the day?

Of course not... every one of your posts is a joke. Almost a crime to humanity.




Edited by on 10-09-08 01:32
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 08:28
I mean something like on a form after you fill it out it gives you a refference number incase you need to contact them and they can reffer it to the reference number that you give them.
If you know what i mean?


Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 11:36
DarkMantis wrote:
I mean something like on a form after you fill it out it gives you a refference number incase you need to contact them and they can reffer it to the reference number that you give them.
If you know what i mean?


Yeah, you could use rand(). I would say to make a random string generator function and then md5 the random string you gave them, store it in a database and output it. That way you are pretty sure it is unique since you can check if it is already in the db. (even though this isn't a number)

Edited by on 10-09-08 11:38
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 12:26
That sounds like a promising idea.
Yeah it doesnt necessarily need to be a 'number' just needs to be a unique string.

Thanks guys =]


Author

RE: Refference number using PHP

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 10-09-08 12:26
from what i have seen in the past the number is random then db tested, and then sent in an e-mail so the user can keep the number, that way if they clear their data they still have it.


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 12:36
DarkMantis wrote:
I mean something like on a form after you fill it out it gives you a refference number incase you need to contact them and they can reffer it to the reference number that you give them.
If you know what i mean?


Ahh, okay. Instead of just generating a random item with rand or uniqid, why not just use unique aspects of the form itself to MD5 and give (truncated to a length of your choice, of course) as a reference code? Examples of this could be the username, a person's mailing address, or even a person's last name and birthdate. As everyone else has already stated, you'd need to store the ref number in the db in order for it to be referenced later.




Edited by on 10-09-08 12:37
Author

RE: Refference number using PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 20:52
If the information is going to be stored in the database why not have a unique table index? That would actually speed-up look up of the form and guarantee uniqueness - whereas random strings and integers do not.

Just have a column - in the row where you store the information - represent the row index. Set it to auto increment and be the primary key for the table.