Skip to content

Instantly share code, notes, and snippets.

@fzaninotto
Created June 17, 2012 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fzaninotto/7327f0c782ae987170c2 to your computer and use it in GitHub Desktop.
Save fzaninotto/7327f0c782ae987170c2 to your computer and use it in GitHub Desktop.
<?php
$image = file_get_contents($path . '/' . $filename);
// wait until the file is loaded into memory
$fp = fsockopen('api.flickr.com', 80, $errno, $errstr, 30));
// wait until the DNS is resolved and the flickr server acknowledges the connection
// ...
fwrite($fp, $image);
// wait until the body is sent to flickr and the flickr server acknowledges the reception
fclose($fp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment