Welcome Guest, Not a member yet? Register   Sign In
Storing a FaceBook profil photo in a Database
#1

[eluser]DocFunky![/eluser]
Hello World !


I got I little problem implementing a Facebook profil photo into my Database:

Okay so here is the picture I would like to store :
<img src="https://graph.facebook.com/&lt;?php echo $fb_data['uid']; ?&gt;/picture" alt="" class="pic" />
[/code]
as you can see, the source is external to my website.

So, I first wanted to store it in a variable this way:
Code:
$mon_image = base64_encode ( file_get_contents ( 'https://graph.facebook.com/&lt;?php echo $fb_data[\'uid\']; ?&gt;/picture' ));
But, i saw here : http://php.net/manual/en/function.file-get-contents.php (turn it in english, I think you just )
that the "file_get_contents" function doesn't support the https.

Another way to perform is the wrappers, and as we can see here : http://fr.php.net/manual/en/wrappers.http.php
it use a GET method to do so : "Allows read-only access to files/resources via HTTP 1.0, using the HTTP GET method."

Yet, I know that "The security filtering function is called automatically when a new controller is invoked. It does the following:

Destroys the global GET array. Since CodeIgniter does not utilize GET strings, there is no reason to allow it."


( http://ellislab.com/codeigniter/user-gui...input.html)

So, is that possible for me to store this image ? If yes, how could i do so ?

Thanks for your help.




Theme © iAndrew 2016 - Forum software by © MyBB