|
Posted by Krustov on 12/10/05 02:14
<comp.lang.php , William Hudson , whudson@privacy.net>
<4399a176$0$138$7b0f0fd3@reader.news.newnet.co.uk>
<Fri, 9 Dec 2005 15:58:56 -0000>
> I want to be able to ask users for a URL, open that page, change some of the
> contents and then display that page as if they had typed the URL into a
> browser. I have toyed with some of the php functions for opening URLs, but
> what I am not clear on is how much work my script will have to do (do I need
> to fully emulate a browser, for example).
>
Text only method .
But if you wanted to pornolize it for example - you could of course
change the html code for your own images :-)
<?php
$handle = fopen("http://www.anydomain.com/", "rb");
$contents = '';
while (!feof($handle))
{$contents .= fread($handle, 8192);}
fclose($handle);
$rocky=str_replace("BBC","Bungholes",$contents); $contents=$rocky;
$rocky=str_replace("bbc","Bungholes",$contents); $contents=$rocky;
$rocky=str_replace("the","its only a word",$contents); $contents=$rocky;
$filename="content.inc"; $fp=fopen($filename,"w"); fwrite ($fp,
$contents); fclose($fp);
print $contents;
?>
[Back to original message]
|