fonctionne tres bien chez moi aussi :)
<b>Date de sortie</b><br /> <?php echo datefra($allocine->release->releaseDate); ?><br /><br />
Quote://upload images
$allowed_types = &$site_config["allowed_image_types"];
$inames = array();
for ($x=0; $x < 2; $x++) {
if (!($_FILES[image.$x]['name'] == "")) {
$y = $x + 1;
//if (!preg_match('/^(.+).(jpg|gif|png)$/si', $_FILES[image.$x]['name']))
// show_error_msg(T_("INVAILD_IMAGE"), T_("THIS_FILETYPE_NOT_IMAGE"), 1);
if ($_FILES['image$x']['size'] > $site_config['image_max_filesize'])
show_error_msg(T_("ERROR"), T_("INVAILD_FILE_SIZE_IMAGE"), 1);
$uploaddir = $site_config["torrent_dir"]."/images/";
$ifile = $_FILES[image.$x]['tmp_name'];
$im = getimagesize($ifile);
if (!$im[2])
show_error_msg(T_("ERROR"), sprintf(T_("INVALID_IMAGE"), $y), 1);
if (!array_key_exists($im['mime'], $allowed_types))
show_error_msg(T_("ERROR"), T_("INVALID_FILETYPE_IMAGE"), 1);
$ret = SQL_Query_exec("SHOW TABLE STATUS LIKE 'torrents'");
$row = mysql_fetch_array($ret);
$next_id = $row['Auto_increment'];
$ifilename = $next_id . $x . $allowed_types[$im['mime']];
$copy = copy($ifile, $uploaddir.$ifilename);
if (!$copy)
show_error_msg(T_("ERROR"), sprintf(T_("IMAGE_UPLOAD_FAILED"), $y), 1);
$inames[] = $ifilename;
}
}
//end upload images
"thib, post: 31973, member: 1149":
évidement c'est faisable. A partir du moment ou tu obtiens l'images via l'api allocine il te suffit d'utiliser l'array de l'image et de le placer dans le champ image1 de la page upload
No users online
Torrents
Members
Online