Search found 783 matches

by Apollo
Mon Oct 24, 2011 6:49 am
Forum: Regex
Topic: number bellow 2012 in a string
Replies: 2
Views: 5933

Re: number bellow 2012 in a string

Code: Select all

rag/([01]?[0-9]{1,3}|20(0[0-9]|1[01]))[abc]
by Apollo
Sun Oct 23, 2011 5:58 pm
Forum: PHP - Code
Topic: How do I make these images clickable?
Replies: 3
Views: 516

Re: How do I make these images clickable?

Way too much code in here... Please extract only the relevant part and put it between [syntax=php]...[/syntax] tags.
by Apollo
Sun Oct 23, 2011 12:51 pm
Forum: PHP - Code
Topic: md5 encryption and decrypt Not working well on remote host
Replies: 13
Views: 3356

Re: md5 encryption and decrypt Not working well on remote ho

Thanks for all the help, @Apollo, are you calling me mad? lol >>> I'm telling that it DID HASH BACK!! And I'm telling you it didn't :) But hey, I'd be happy to be proven wrong, cause that would open all sorts of possibilities. I'm willing to bet a million dollars you can't "hash back" thi...
by Apollo
Sun Oct 23, 2011 9:35 am
Forum: PHP - Code
Topic: md5 encryption and decrypt Not working well on remote host
Replies: 13
Views: 3356

Re: md5 encryption and decrypt Not working well on remote ho

@ Apollo, Yes it did work on local server!!! No database errors. I tested everything and double checked! Just tried it now and it still does works!!!! Strange ha?? I hope it doesn't give you nightmares hehehehe. Well, I'm quite sure you made a mistake somewhere or misinterpreted a result. No md5 ch...
by Apollo
Sun Oct 23, 2011 5:08 am
Forum: PHP - Security
Topic: Where to store Salt constant (linux/MAMP setup)?
Replies: 2
Views: 3877

Re: Where to store Salt constant (linux/MAMP setup)?

My question is this: How do we safely secure the const_salt string? Can someone point me in the right direction? Obviously we don't want to store it as a variable in the web application layer like in a PHP file. Why not? What are the various techniques for solving this problem? Do we store the salt...
by Apollo
Sun Oct 23, 2011 4:50 am
Forum: PHP - Code
Topic: Cookies or session ?
Replies: 12
Views: 883

Re: Cookies or session ?

First of all you never ever store an actual password AT ALL, anywhere. Anyway, session or cookie: depends on how long you want to store it (and how secure). Session = stored server side, expires when their "session ends" (usually when their browser closes or after an hour of inactivity or ...
by Apollo
Sun Oct 23, 2011 4:37 am
Forum: PHP - Code
Topic: md5 encryption and decrypt Not working well on remote host
Replies: 13
Views: 3356

Re: md5 encryption and decrypt Not working well on remote ho

Well, here goes: md5 is one way hashing, not encryption that can be decrypted, and md5 is weak to begin with! :) My guess was: if hashing is just a case of giving a crypt code equivalent to some word, then this crypt code would always be equivalent to the same word. It worked! and it also prooves it...
by Apollo
Fri Oct 21, 2011 4:43 am
Forum: PHPDN Suggestions
Topic: 'inline code tag' (just using courier font or something)
Replies: 7
Views: 30405

Re: 'inline code tag' (just using courier font or something)

Thanks, although it seems to mess up with pretty much any non-alphabetic character between the tags (e.g. this works vs [inline]this doesn't[/inline] because of the single quote). Perhaps some bbcode regexp is a bit too restricted currently? Same happens with : ; " # $ etc, so that makes it kin...
by Apollo
Wed Oct 19, 2011 7:43 am
Forum: Regex
Topic: Simple RegEx Pattern- Help with the last bit
Replies: 3
Views: 6662

Re: Simple RegEx Pattern- Help with the last bit

My regex so far ([^-]([0-9]+[^-])) ^ between [ ] means "not". So you're actually matching: any char except dash, followed by one or more digits, followed by any char except dash again. Even just "123" will match this pattern already. Try this: preg_match( '#^[0-9]+-[0-9]+-[0-9]+...
by Apollo
Mon Oct 17, 2011 11:11 am
Forum: PHPDN Suggestions
Topic: 'inline code tag' (just using courier font or something)
Replies: 7
Views: 30405

'inline code tag' (just using courier font or something)

Instead of using [code] or [syntax=somelanguage] to include a block of code, it can be very convenient to just include a small piece of code (a single statement or something) 'inline', i.e. in the middle of your text. No fancy markup required, to distinguish code from regular text it...
by Apollo
Mon Oct 17, 2011 10:38 am
Forum: PHP - Code
Topic: Cant use submit button
Replies: 4
Views: 7893

Re: Cant use submit button

If your form has an input element named 'submit', then your javascript code document.myform.submit() will suddenly refer to the input element, rather than the form's submit() method. And no way to explicitly specify which you mean. This sort of ambiguity crap is one of the many reasons why I hate ja...
by Apollo
Mon Oct 17, 2011 10:29 am
Forum: PHP - Code
Topic: Check if password exists when signing up
Replies: 10
Views: 2026

Re: Check if password exists when signing up

lewisp.cox wrote:What I want to know is if there is a way in PHP to find if the password that the user has submitted is in use by someone else?
If this is even possible at all, it's a indication of bad security on your end.
by Apollo
Fri Oct 14, 2011 10:49 am
Forum: PHP - Code
Topic: I need to make a DOS console application with PHP
Replies: 2
Views: 688

Re: I need to make a DOS console application with PHP

You could install WAMP or XAMPP and run your .php scripts using PHP CLI.
by Apollo
Thu Oct 13, 2011 5:50 am
Forum: PHP - Code
Topic: Question here for you guys with knowledge on PHP capability
Replies: 24
Views: 3334

Re: Question here for you guys with knowledge on PHP capabil

The link you posted there is a .html file. Again, this won't work! Unless you did some trickery to internally redirect that (using mod_rewrite) to a .php file, or reconfigured Apache to parse .html as PHP well (neither of which is the case), this means your webserver (Apache) will parse it as HTML, ...
by Apollo
Thu Oct 13, 2011 5:43 am
Forum: PHP - Security
Topic: Pasword Salt
Replies: 5
Views: 4210

Re: Pasword Salt

I'm getting a membership site put up soon, and I already have user registrations and logins. I hash the passwords using sha1, but how do i salt my passwords for extra security? $h = hash( 'whirlpool', $password.'n2m#E9S(hqdJH-ir8!7m/D5bk4_iQ'.$userId ); ($userId being some unique ID per user that d...