示例#1
0
 echo "<li> creating objects...</li>";
 $game = new migGame($dbc, $debug, $catLvl, $webCat);
 $game->addFiles($contentId, $juegos);
 try {
     // cargo el contenido
     echo "<li> loading content...</li>";
     $game->loadContent($contentId);
 } catch (Exception $e) {
     $log .= "loadContent: " . $e->getMessage() . "<br/>";
 }
 $game->setTag($catmig);
 $game->setSubTag($subcatmig);
 $game->setKeywords($keywords[$i]);
 //$game->setShortDesc($shortDesc[$i]);
 //	$game->setLongDesc($longDesc[$i]);
 $uniqueId = $game->getUniqueId();
 // creo carpeta destino
 $dirToWrite = TMP_DIR_JG . "/{$uniqueId}";
 echo "<li> creating temp dir <b>{$dirToWrite}</b>...</li>";
 exec("mkdir {$dirToWrite}");
 try {
     $content_download = FALSE;
     // descargo contenido por FTP
     $ftpCon = new Ftp();
     $retries = 0;
     $i = 0;
     $conectado = FALSE;
     echo "<li> connecting to FTP...</li>";
     $conectado = $ftpCon->login_r(null, null, FTP_CONN_RETRIES);
     if ($conectado === TRUE) {
         echo "+ connection Ok!";