Jump to content

Recommended Posts

Hello,

Currently, I'd like to check a text area to see if there are any links, if so, check the href attribute for certain characters, and quit the script if they have those certain characters...

I'm guessing it would involve searching for "href" and all text assigned to href would then be checked by some php function, however, I don't know which functions would be used for any of this, if someone could list the functions needed, I'll do the research on them.

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/14351-checking-a-text-area-for/
Share on other sites

Well, actualy...

I want php to find links if there are any, then find what is assigned to the href attribute, that being, the URL. For example, let's say someone enters the following HTML into a text-area...

{a href=http://www.phpfreaks.com/}Click Here{/a} (apparently, this forum allows HTML, so...replace { & } with the greater/lesser than symbols when reading)
I'd want php to find what is assigned to href, then for example, if it contains the characters php, then I'd want script to end and return an error.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.