Page 1 of 1
How to integrate a form from our servr into another website?
Posted: Tue Apr 24, 2007 3:32 am
by php_ghost
I have this somewhat like an application form that must be integrated into our clients' website. Everything that their customers inputs in that form goes to our server's database.
How can I make this, so that only authorized clients/users can integrate the form in their site?
TIA

Posted: Tue Apr 24, 2007 6:06 am
by Mohit_Prog
1.
you can write a form. that should be on [s]ur[/s]
your client's server.
In form's action method give path of script written at your server( i.e.,
http://www.myserver.com/formdb.php )
In that file do whatever [s]u[/s]
you want with those data.
2.
Or [s]u[/s]
you can put some link on your client's website. From that link, user come to [s]ur[/s]
your site.( In this case form and script both are at [s]ur[/s]
your side. )
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
Posted: Tue Apr 24, 2007 6:18 am
by php_ghost
Yah I've thought of this too. But if I use this, others can spam my database. Is there anyway to limit others from submitting to the page?
Posted: Tue Apr 24, 2007 6:22 am
by mentor
You can confirm from which host/referrer ($_SERVER['HTTP_REFERER']) it is being posted. Though it is not completely reliaable.
Posted: Tue Apr 24, 2007 6:30 am
by CoderGoblin
I believe you could use an iframe but not sure if it is allowed for browser security. One of your major difficulties is the client security. Passing a unique id in the URL doesn't work as someone could simply copy it. You need to therefore figure out an alternative method.
Racking my brains... one possible solution would be to give your clients (if they had PHP) a PHP CURL script which logs into your site with a client_name and password then goes to the form and inserts it (and any results) into the HTML on their side. The CURL script runs on their site not yours. Anyone other than the clients wouldn't have the CURL script, only access to the HTML hence problem solved. They wouldn't even necessarily know they are connecing to your site.
Of course I'm now waiting for someone to tell me I'm wrong and that there is a much easier method.

Posted: Tue Apr 24, 2007 6:33 am
by mentor
@CoderGoblin
cURL/fopen is a good option, but on shared servers you are not sure if these are enabled.
Posted: Tue Apr 24, 2007 6:42 am
by php_ghost
You can confirm from which host/referrer ($_SERVER['HTTP_REFERER']) it is being posted. Though it is not completely reliaable.
Yah I've been trying this one and yes it's not completely reliable.
Thanks mentor and CoderGoblin. I'll try your suggestions.
Thanks everyone for your replies.
