Skip to content

Instantly share code, notes, and snippets.

@jtwalters
Created January 20, 2015 17:52
Show Gist options
  • Save jtwalters/1a6d110ad5e45abab418 to your computer and use it in GitHub Desktop.
Save jtwalters/1a6d110ad5e45abab418 to your computer and use it in GitHub Desktop.
Save a remote file URI in Drupal 7
<?php
$file = remote_stream_wrapper_file_create_by_uri($uri);
$file_result = file_save($file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment