Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $file = file_save_data(file_get_contents($image_url), file_default_scheme().'://tmp/'.basename($image_url));
- $file->status = 1;
- $node->field_image['und'][0] = (array)$file;
- node_save($node);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement