I am cURLing a page and want to check if this string is found anywhere on the page between javascript tags (using php):
';()//
But there could be other code between like:
<script>
..stuff
';()//
.. more stuff
</script>
Can anyone post an example?
This kinda do the job:
echo preg_match("#script.*';\(\)\/\/.*\/script#im", str_replace("
", "", $html), $matches);
It returns 1 if a match was found, 0 if none.