On Wed, Sep 28, 2011 at 4:06 PM, tamouse mailing lists
<tamouse.li...@gmail.com> wrote:
> On Wed, Sep 28, 2011 at 3:28 AM, muad shibani <muad.shib...@gmail.com> wrote:
>> what are the costs of using PHP Curl to show another websites on my site as
>> stumbleon do ..
>> traffic, memory or what?
>
> If you use curl to suck the web page into a variable, could be
> tremendous. Better to curl it into a temporary file if you're going
> that way.
>

Just a followup -- if you want to show other websites on your own
page, a friendly way to do this is using an iframe:

<?php
$site="http://www.example.com";;
?>

<h2><a href="<?php echo $site?>"><?php echo $site?></a></h2>
<iframe src="<?php echo $site?>" frameborder="0" title="<?php echo
$site?>" width="80%" height="200px"><span
style="color:red;font-weight:bold;">Your browser does not support
iframes</span></iframe>

That way, the site gets the hit, and you aren't copying anything. If
you do go this way, make sure to provide a break out so the user can
open the target site in a new window/tab.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to