You are here: Re: Open and process remote page « PHP Programming Language « IT news, forums, messages
Re: Open and process remote page

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;

?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация