Re: Curl cost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 28, 2011 at 4:06 PM, tamouse mailing lists
<tamouse.lists@xxxxxxxxx> wrote:
> On Wed, Sep 28, 2011 at 3:28 AM, muad shibani <muad.shibani@xxxxxxxxx> 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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux