[advanced search]
Results from the most recent live auction are here.
24 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 08-12-2005, 10:06 PM   · #1
Outer
NamePros Member
 
Name: Corey
Location: Texas USA
Trader Rating: (1)
Join Date: Jan 2005
Posts: 71
NP$: 203.00 (Donate)
Outer is an unknown quantity at this point
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
}


Please register or log-in into NamePros to hide ads
__________________
I wonder...
Outer is offline   Reply With Quote
Old 08-13-2005, 05:43 AM   · #2
Porte
Template Designer
 
Porte's Avatar
 
Name: Ahmed
Location: Somewhere on earth!
Trader Rating: (29)
Join Date: May 2005
Posts: 3,533
NP$: 17.30 (Donate)
Porte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud of
Oh well, very nice idea actually. Thanks for this
Porte is offline   Reply With Quote
Old 08-13-2005, 05:55 AM   · #3
skrilla
Senior Member
 
Location: canada
Trader Rating: (34)
Join Date: Mar 2005
Posts: 1,008
NP$: 198.76 (Donate)
skrilla is just really niceskrilla is just really niceskrilla is just really niceskrilla is just really nice
interesting. might come in handy some day. thnx
__________________
Come visit my Ebay Store
COME VISIT NOW!!! Sign up for adsense at www.ratemymug.com
This line is for sale PM for details
skrilla is offline   Reply With Quote
Old 08-13-2005, 07:59 AM   · #4
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 


Name: Eric
Location: Kentucky
Trader Rating: (140)
Join Date: Mar 2005
Posts: 4,199
NP$: 1501.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
Nice. I may implement this in a contact script I'm currently writing. Thanks.


-Eric
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.1 now available!!
MetaCreator.com - Free Meta Tag Creator
CodingPlanet.com - Coming soon...
SecondVersion is offline   Reply With Quote
Old 08-19-2005, 12:25 AM   · #5
bbalegere
Senior Member
 
Name: Bharat Balegere
Location: Bangalore
Trader Rating: (15)
Join Date: Jul 2005
Posts: 1,179
NP$: 10.25 (Donate)
bbalegere is just really nicebbalegere is just really nicebbalegere is just really nicebbalegere is just really nice
Thanks for the code.It has helped me.
bbalegere is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
paypal check withdrawal dotcommakers The Break Room 2 07-09-2005 10:45 PM
where can I check for trademarks on domains? gazzip Domain Name Discussion 9 04-14-2005 07:00 AM
FREEWHO.COM Adds Multi-Domain Check Functions... Nexus For Sale / Advertising Board 4 10-16-2004 03:40 PM
I check a us domain, somewhere shows taken,some available 9495 Domain Name Discussion 2 04-10-2004 02:37 AM

Site Sponsors
NameChatter NameChatter Get Your Site Linked at LinkedKeywords.com
Advertise your business at NamePros
All times are GMT -7. The time now is 07:25 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0