Page 1 of 1

securely transferring data from only one site to another

Posted: Wed Dec 20, 2006 10:37 pm
by wackyakmed
I am writing a simple script that receives data from another site. The data is then processed and stored in my database. Since the data will always be coming from the same website, I'd like this forum's input on whether limiting access to the script based on host name is a legitimately secure tactic. Also, what is the php command to achieve this? Thanks for the advice in advance!

Posted: Wed Dec 20, 2006 10:41 pm
by neophyte
One way you could accomplish this is through a .htaccess command. Use the allow and deny directive on the file. I can't remember the exact directives. But you should be able find it googling for something like: htaccess deny allow...

Something like that.

Posted: Thu Dec 21, 2006 1:34 am
by jmut
maybe you could also try to simulate some public/private keys infrastructure.
Where sending site sends some key/token or whatever....that should be correct for your side to process....but this is probably not necessary :)
Make .htaccess approach first.

Posted: Thu Dec 21, 2006 2:26 am
by John Cartwright
if your really serious about security, you should consider hosting the sites on the same server and sharing the database..

you could even setup a remote link to the database and fetch the info directly

Posted: Fri Dec 22, 2006 7:37 pm
by Ambush Commander
I'd go for the public/private key infrastructure. GnuPG is always a good pick.