Suppose that I have a comments form, and I want to prevent bad users from copying the form html source code , with the action attribute to use it elsewhere outside my website.
What I have to do?
I got a simple idea, But I don’t know if it’s working or not (even I don’t know what php methods to use)
The idea is to add a variable $ip in the page, this $ip is the php file (and form) location (maybe using $_SERVER[‘PHP_INFO’] or other)… then sending this variable to the add.php file with a POST method but without displaying in the html code source.
in add.php , the server will check if the ip of the page is equal to the ip adress of the server or not , then it will decide wether to add comment or kill the operation.
I hope discuss about this subject
thank you in advance
You could do the following: