Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-02-2009, 09:54 AM Help me with this
youngbobby's Avatar
Novice Talker

Posts: 5
Name: Young Bobby
Trades: 0
Hi,
Recently, i was coding up a simple mail sender for wapsites.
I thought maybe to create a feature for those who don't have server-side scripting knowledge and back links to their sites but my problem is this.
Lets say i've created a form called forma.php with stuffs like
HTML Code:
<form action="sendmail.php" method="get">
Sitename: <input name="sn" type="text" />
Logo Url: <input name="logourl" type="text" />
<input type="submit" value="submit" />
</form>
then maybe when the user wants to link to his site, he should get something like:

http://mydomain.com/sendmail.php?sn=...hislogourl.com

Where my problem lies is how to display the above address to the user "alone" who registered in my site for such service.
Pls remember i said "to the person registering alone"
Can anyone help?

Last edited by youngbobby; 06-02-2009 at 09:59 AM.. Reason: Not complete
youngbobby is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-02-2009, 10:30 AM Re: Help me with this
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Include a challenge as a hidden field in your form.
This should level up the security enough.

In your user db, have an uid, or hash field, that you update with a new random generated value on each access.
Put that value in the form as a hidden field.

Now, when a submit is done, compare that the value in the db match the one in the form.
If it does, then the POST is (or at least, should be with a high probability) legitimate.
If not, well, it may be a forged post, or that the user had several windows/tab opened on the same page, and that the challenge is not valid anymore.

With this, you don't limit where the requests are coming, but you validate against forging.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 06-02-2009, 10:53 AM Re: Help me with this
youngbobby's Avatar
Novice Talker

Posts: 5
Name: Young Bobby
Trades: 0
Well thanks but i'm not making use of dbase cos i'm new and i don't have full knowledge of it yet.

Pls see this demo @ http://mobilust.net/freeemail/createfreeemailsender.asp
and see what i mean. I want to have something similar to that.
Thanks for replying.

Last edited by youngbobby; 06-02-2009 at 10:54 AM.. Reason: error
youngbobby is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help me with this
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44629 seconds with 12 queries