hi,
i have a php file that perform a query with the data that he receive
form post information.
what i need to do is detect from where the data is coming is is same domain
or not and block when is not from the same domain.
thanks a lot for your help :)

You could check to see if the referer is set ($_SERVER). However, this can be spoofed, or the variable may not be set at all. What you could do is set a session variable to a random key, or insert this as a hidden field in your form. When posting, you can check both values. If they are the same allow, otherwise ignore. In both cases remove the session variable.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.