PHP, extract facebook user's image and save it into db
<p>My website use facebook login api to make people to log in easily. </p>

<p>I could get user's facebook profile image if I know their facebook ID number.</p>

<pre><code>$fb_id = $this-&gt;input-&gt;post('fb_id');
$fb_image_url = 'https://graph.facebook.com/'.$fb_id.'/picture?type=large';
</code></pre>

<p>so if I have right id number and post the url on website, it redirects to jpg address. </p>

<pre><code>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/274661_1171545457_647564606.jpg
</code></pre>

<p>Therefore, I can't use the first address to save the image file into db.</p>

<p>I need to do something to get real image address before I use $fb_image_url.</p>

<p>is there a way to get the final address by using PHP?</p>
