Changeset 26180 for extensions/flickr2piwigo/include/functions.inc.php
- Timestamp:
- Dec 24, 2013, 6:23:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/flickr2piwigo/include/functions.inc.php
r21288 r26180 1 1 <?php 2 if (!defined('FLICKR_PATH'))die('Hacking attempt!');2 defined('FLICKR_PATH') or die('Hacking attempt!'); 3 3 4 4 /** … … 30 30 return false; 31 31 } 32 32 33 33 $return = ($dest === true) ? true : false; 34 34 35 35 /* curl */ 36 36 if (function_exists('curl_init')) … … 41 41 } 42 42 $ch = curl_init(); 43 43 44 44 curl_setopt($ch, CURLOPT_URL, $src); 45 45 curl_setopt($ch, CURLOPT_HEADER, false); … … 65 65 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 66 66 } 67 67 68 68 $out = curl_exec($ch); 69 69 curl_close($ch); 70 70 71 71 if ($out === false) 72 72 { … … 90 90 return false; 91 91 } 92 92 93 93 $opts = array( 94 94 'http' => array( … … 100 100 101 101 $context = stream_context_create($opts); 102 102 103 103 if (($file = file_get_contents($src, false, $context)) === false) 104 104 { 105 105 return 'file_error'; 106 106 } 107 107 108 108 if (!$return) 109 109 { … … 116 116 } 117 117 } 118 118 119 119 return false; 120 120 } 121 121 } 122 123 ?>
Note: See TracChangeset
for help on using the changeset viewer.