Re: curl equivalent in PHP

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

 



Hello,

On Fri, Mar 2, 2012 at 8:07 AM, Jim Lucas <lists@xxxxxxxxx> wrote:
>> But on some of my servers, curl isn't enabled! Is there any equivalent
>> code
>> to  achieve the same?

I've used a combination of output buffering [1], readfile() [2] and
caching (specific to the framework I was using).

Simply, you could resort to:

<?php readfile('http://www.google.com'); ?>

Ofc, the links would need to be absolute in order for the assets to load.

Good luck!

Cheers,
Micky

    [1] php.net/ob-start
    [2] php.net/readfile

-- 
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