php, getimagesize
<p>In server is many pictures, they pictures have names with space, examples: home 3.png, my new car.jpg.
And i need get all images sizes.
Why getimagesize() show errors with those images?</p>

<p>Error:</p>

<pre><code>Warning: getimagesize(http://127.0.0.1/img 1.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found...
</code></pre>

<p>If i run picture: <a href="http://127.0.0.1/img" rel="nofollow">http://127.0.0.1/img</a> 1.jpg in browser everything good (so link good).</p>

<p>Full code:</p>

<pre><code>&lt;?php
require_once('simple_html_dom.php');

$string = str_get_html('some text some text &lt;img src = "http://127.0.0.1/img 1.jpg" /&gt; text .... ');

foreach($string-&gt;find('img') as $e)
    $img[] = $e-&gt;src;

$img_1 = getimagesize($img[0]);
print_r($img_1);
?&gt;
</code></pre>
