Quote:
Originally Posted by flygirl1113
This is exactly what I want to do. Can you tell me how to go about it, or tell me where I can find instructions? Thanks!
|
Without seeing the URL in question, I can't say.
If there's a message body field ( like in most email, blog comments, discussion forums, and so on ) then you get that in a string variable when the user clicks submit.
In asp.net you would use syntax like:
if(messageBody.Contains("http://") || messageBody.Contains("https://"))
Response.End();
or:
If messageBody.Contains("http://") OrElse messageBody.Contains("https://") Then Response.End()
In asp it would be more like:
If mid$(messageBody, "http://") > 0 Or mid$(messageBody."https://") Then Response.End
In php, cold fusion, or any other server side technology, you want to add some processing like that to the beginning of what happens when the form is submitted.
You could send down a message like "Sorry no links are allowed." before ending the page. If you think they're robots, you could send down a moved permanently or not authorized error. The smarter ones will try again in a week or two, then give up for good.
|