How can I create in Perl or PHP a script that display a given webpage removing some regex defined strings from them?
Example:
www.mysite.com/loadstrippedpage.cgi is our script
www.foobar.com/abc/webpage.html is the webpage we want to display in stripped version.
www.foobar.com/abc/webpage.html contains this text:
"<a href=
http://www.pippo.com>
Pippo is a good boy</a>"
These are the defined regexes (incorporated in the script):
<a href=[^>]*>
</a>
We launch the script like this
www.mysite.com/loadstrippedpage.cgi?url=www.foobar.com/abc/webpage.html and must obtain this output:
"Pippo is a good boy"
Thanks in advance
Luca
Start Free Trial