Re: best function to use ~ file_get_contents or ?
| From: | Tommy Pham | Date: | Wed, 16 Sep 2009 01:50:44 +0000 |
| Subject: | Re: best function to use ~ file_get_contents or ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298084@lists.php.net to get a copy of this message | ||
--- On Tue, 9/15/09, CRM <crm@globalissa.com> wrote:
> From: CRM <crm@globalissa.com>
> Subject: [PHP] best function to use ~ file_get_contents or ?
> To: php-general@lists.php.net
> Cc: info@globalissa.com
> Date: Tuesday, September 15, 2009, 5:36 PM
> Hi All,
> Not sure of the best approach, need your feedback. I have 4
> images on a
> website. These are used in navigation. When I load a
> reference webpage on my
> local machine the local page calls 4 images from an
> external website, each
> image will be on a different domain.
>
> What I want to see is if the navigation images/buttons can
> be loaded/displayed
> in my browser. If they can, then I will display the images
> on my local page.
> If the images cannot be loaded, then this indicates some
> connection issue and
> the result will be some text like 'Site Offline'. So just
> by glancing at my
> local machine reference page I can tell if one or more of
> the different sites
> is or is not available.
>
> So what is the best function to use?
>
> if ( @file_get_contents( DOMAIN_PATH .
> "images/navigation/nav_globalissa.png" )):
>
> or ???
>
> Please also cc info@globalissa.com
>
> Thanks for any helpful suggestions.
>
> Sincerely,
>
> Rob
> Global I.S. S.A.
> Software Powers the Net
> Email: crm at globalissa dot com
>
> * * * The Forge of Globalissa ~ PHP Foobar Machine * * *
> http://globalissa.com/forge/
>
>
Shouldn't it be:
if ( @file_get_contents( DOMAIN_PATH .
"images/navigation/nav_globalissa.png", FILE_BINARY))