<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Checking if an image URL exist with PHP&#8230;.</title>
	<atom:link href="http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/feed/" rel="self" type="application/rss+xml" />
	<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/</link>
	<description>Searching.....</description>
	<lastBuildDate>Sun, 13 Dec 2009 18:19:52 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rajbir</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-3256</link>
		<dc:creator>Rajbir</dc:creator>
		<pubDate>Mon, 22 Jun 2009 04:34:57 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-3256</guid>
		<description>What if an image doesn&#039;t exist at the url...? How do I make it not show an error?</description>
		<content:encoded><![CDATA[<p>What if an image doesn&#8217;t exist at the url&#8230;? How do I make it not show an error?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: takien</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-3246</link>
		<dc:creator>takien</dc:creator>
		<pubDate>Fri, 05 Jun 2009 07:20:54 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-3246</guid>
		<description>thanks, 

I prefer  to use your code, pushpinder.

&lt;code&gt;
I say this works…

function image_exists($url)
{

$info = @getimagesize(urlencode($url));

return((bool) $info);

}
&lt;/code&gt;

because, this one is take long time to load...

&lt;code&gt;
$url=@getimagesize($url);
if(!is_array($url))
{

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>thanks, </p>
<p>I prefer  to use your code, pushpinder.</p>
<p><code><br />
I say this works…</p>
<p>function image_exists($url)<br />
{</p>
<p>$info = @getimagesize(urlencode($url));</p>
<p>return((bool) $info);</p>
<p>}<br />
</code></p>
<p>because, this one is take long time to load&#8230;</p>
<p><code><br />
$url=@getimagesize($url);<br />
if(!is_array($url))<br />
{</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pushpinder</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-3200</link>
		<dc:creator>pushpinder</dc:creator>
		<pubDate>Wed, 22 Apr 2009 18:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-3200</guid>
		<description>I say this works... 

function image_exists($url)
{

$info = @getimagesize(urlencode($url));

return((bool) $info);

}</description>
		<content:encoded><![CDATA[<p>I say this works&#8230; </p>
<p>function image_exists($url)<br />
{</p>
<p>$info = @getimagesize(urlencode($url));</p>
<p>return((bool) $info);</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-3193</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Tue, 14 Apr 2009 15:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-3193</guid>
		<description>Cron&#039;s code above also worked much faster for me. Nice contributions on all sides.</description>
		<content:encoded><![CDATA[<p>Cron&#8217;s code above also worked much faster for me. Nice contributions on all sides.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cron</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-3149</link>
		<dc:creator>cron</dc:creator>
		<pubDate>Wed, 11 Feb 2009 15:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-3149</guid>
		<description>I found this function very slow so I came up with another solution to the problem. The function below only gets 1 byte of data from the image and it seems to be a bit quicker on my server at least:

function url_exists($url) {
      if(@file_get_contents($url,0,NULL,0,1)){return 1;}else{ return 0;} 
} 

Cheers,
cron</description>
		<content:encoded><![CDATA[<p>I found this function very slow so I came up with another solution to the problem. The function below only gets 1 byte of data from the image and it seems to be a bit quicker on my server at least:</p>
<p>function url_exists($url) {<br />
      if(@file_get_contents($url,0,NULL,0,1)){return 1;}else{ return 0;}<br />
} </p>
<p>Cheers,<br />
cron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-3122</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Sat, 03 Jan 2009 13:04:40 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-3122</guid>
		<description>dFjIaR hi nice site thanx http://peace.com</description>
		<content:encoded><![CDATA[<p>dFjIaR hi nice site thanx <a href="http://peace.com" rel="nofollow">http://peace.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cwxwwwxwwxwx</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-3121</link>
		<dc:creator>cwxwwwxwwxwx</dc:creator>
		<pubDate>Tue, 23 Dec 2008 14:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-3121</guid>
		<description>well, hi admin adn people nice forum indeed. how&#039;s life? hope it&#039;s introduce branch ;)</description>
		<content:encoded><![CDATA[<p>well, hi admin adn people nice forum indeed. how&#8217;s life? hope it&#8217;s introduce branch <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aa</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-2932</link>
		<dc:creator>aa</dc:creator>
		<pubDate>Thu, 07 Aug 2008 18:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-2932</guid>
		<description>Hi,

Just thought I&#039;d let you know, problem solved.

It was just including a warning message, so I  included &#039;@&#039; in front of getimagesize.

So:

$imgurl_check = &#039;imgurl&#039;;

if (!is_array(@getimagesize($imgurl_check)))
{
..
}</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Just thought I&#8217;d let you know, problem solved.</p>
<p>It was just including a warning message, so I  included &#8216;@&#8217; in front of getimagesize.</p>
<p>So:</p>
<p>$imgurl_check = &#8216;imgurl&#8217;;</p>
<p>if (!is_array(@getimagesize($imgurl_check)))<br />
{<br />
..<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aa</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-2931</link>
		<dc:creator>aa</dc:creator>
		<pubDate>Wed, 06 Aug 2008 23:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-2931</guid>
		<description>Sorry, directly = directory.</description>
		<content:encoded><![CDATA[<p>Sorry, directly = directory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aa</title>
		<link>http://junal.wordpress.com/2008/07/22/checking-if-an-image-url-exist/#comment-2930</link>
		<dc:creator>aa</dc:creator>
		<pubDate>Wed, 06 Aug 2008 23:17:40 +0000</pubDate>
		<guid isPermaLink="false">http://junal.wordpress.com/?p=156#comment-2930</guid>
		<description>And even if the directly wasn&#039;t the right one, isn&#039;t the whole point of this to figure out whether the file (file path) exists?

Any suggestions?

Thanks</description>
		<content:encoded><![CDATA[<p>And even if the directly wasn&#8217;t the right one, isn&#8217;t the whole point of this to figure out whether the file (file path) exists?</p>
<p>Any suggestions?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
