 |
Results from the most recent live auction are here.
24 members in the live chat room. Join Chat!
| |
08-12-2005, 10:06 PM
|
· #1 | | NamePros Member Name: Corey Location: Texas USA Join Date: Jan 2005
Posts: 71
NP$: 203.00 ( Donate)
| Referer Check I use this code each time a form is submitted to check to make sure external scripts aren't run when a user wants to submit the data
It also has other uses. Basically an extra security precaution PHP Code: <?php
// Set this to your domain name
$referer = "domain.com";
// Explode the HTTP_REFERRER address to split up the string
$ref = explode('/', $_SERVER['HTTP_REFERER']);
// next piece of code checks for the 'www.'
// Some people use http://domain.com and others use http://www.domain.com. This will remove the 'www.' as to let users have their choice
if (strstr($ref['2'], 'www.')) { $ref['2'] = str_replace('www.', '', $ref['2']); }
// check if they match or not
if ($ref['2'] != $referer)
{
echo "You are not allowed to enter information from an external form.";
}
else
{
// Continue with script
}
__________________
I wonder...
|
| |
08-13-2005, 05:43 AM
|
· #2 | | Template Designer Name: Ahmed Location: Somewhere on earth! Join Date: May 2005
Posts: 3,533
NP$: 17.30 ( Donate)
| Oh well, very nice idea actually. Thanks for this  |
| |
08-13-2005, 05:55 AM
|
· #3 | | Senior Member Location: canada Join Date: Mar 2005
Posts: 1,008
NP$: 198.76 ( Donate)
| interesting.  might come in handy some day. thnx |
| |
08-13-2005, 07:59 AM
|
· #4 | | while ($awake){ code(); } Name: Eric Location: Kentucky Join Date: Mar 2005
Posts: 4,199
NP$: 1501.00 ( Donate)
| Nice. I may implement this in a contact script I'm currently writing. Thanks.
-Eric |
| |
08-19-2005, 12:25 AM
|
· #5 | | Senior Member Name: Bharat Balegere Location: Bangalore Join Date: Jul 2005
Posts: 1,179
NP$: 10.25 ( Donate)
| Thanks for the code.It has helped me. |
| |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |