habe da ein prob, hab die aktuelle version installiert und wenn ich über imdb en film suche und klick den an, fügt der mir die schauspieler nicht dazu und den Regisseur au nicht

woran liegt dat
Moderator: Lifestyle
Code: Alles auswählen
// Regisseure
$search = '<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Regie:';
$this->buf1 = explode( $search, $this->siteBuf );
$this->buf2 = explode( "</tr>", $this->buf1[1] );
//$search = "<a href='view.php?page=liste&Name=";
$search = "<a href=\"view.php?page=film_detail&fid=".$this->importID."\">";
$this->buf1 = explode( $search, $this->buf2[0] );
$this->buf1[1] = ltrim($this->buf1[1]);
$this->buf1[1] = str_replace("<br>", ";", $this->buf1[1]);
$this->buf2 = explode ( ";</a>", $this->buf1[1]);
$this->buf1 = explode ( ";", $this->buf2[0]);
$this->varToImport['regisseure'] = array();
for ( $i=1; $i<=count($this->buf1); ++$i ) {
$this->varToImport['regisseure'][$i-1] = $this->buf1[$i-1];
}
// Schauspieler
$search = "<td nowrap><font face=\"Arial,Helvetica,sans-serif\" size=\"2\" class=\"Normal\">Darsteller:";
$this->buf1 = explode( $search, $this->siteBuf );
$this->buf2 = explode( "</tr>", $this->buf1[1] );
//$search = "<a href='view.php?page=liste&Name=";
$search = "<a href=\"view.php?page=film_detail&fid=".$this->importID."\">";
$this->buf1 = explode( $search, $this->buf2[0] );
$this->buf1[1] = ltrim($this->buf1[1]);
$this->buf1[1] = str_replace("<br>", ";", $this->buf1[1]);
$this->buf2 = explode ( ";</a>", $this->buf1[1]);
$this->buf1 = explode ( ";", $this->buf2[0]);
$this->varToImport['actors'] = array();
for ( $i=1; $i<=count($this->buf1); ++$i ) {
$this->varToImport['actors'][$i-1] = $this->buf1[$i-1];
}
Code: Alles auswählen
// Regisseure
$search = '<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Regie:';
$this->buf1 = explode( $search, $this->siteBuf );
$this->buf2 = explode( "</tr>", $this->buf1[1] );
$this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]);
$this->buf2[0] = str_replace(" ", "", $this->buf2[0]);
$this->buf2[0] = strip_tags($this->buf2[0]);
$this->buf1 = explode ( ";", $this->buf2[0]);
$this->varToImport['regisseure'] = array();
for ( $i=1; $i<count($this->buf1); $i++ ) {
$this->varToImport['regisseure'][$i-1] = $this->buf1[$i-1];
}
// Schauspieler
$search = "<td nowrap><font face=\"Arial,Helvetica,sans-serif\" size=\"2\" class=\"Normal\">Darsteller:";
$this->buf1 = explode( $search, $this->siteBuf );
$this->buf2 = explode( "</tr>", $this->buf1[1] );
$this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]);
$this->buf2[0] = str_replace(" ", "", $this->buf2[0]);
$this->buf2[0] = strip_tags($this->buf2[0]);
$this->buf1 = explode ( ";", $this->buf2[0]);
$this->varToImport['actors'] = array();
for ( $i=1; $i<count($this->buf1); $i++ ) {
$this->varToImport['actors'][$i-1] = $this->buf1[$i-1];
}
Aufgepasst!!! Die Daten der Schauspieler werden übernommen, aber auch der Link ...[mehr] steht jetzt immer am Ende. Also, wenn (wie ich schon im Gemeinschaftsforum gepostet habe http://www.gemeinschaftsforum.com/forum ... #msg546439 ) diese Zeile in der OFDB nicht weg gemacht wird, muss man eben, das jetzt immer zusätzlich löschen.Nasenmann72 hat geschrieben:And again...
Meine NEUE Lösung:
Code: Alles auswählen
// Regisseure $search = '<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Regie:'; $this->buf1 = explode( $search, $this->siteBuf ); $this->buf2 = explode( "</tr>", $this->buf1[1] ); $this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]); $this->buf2[0] = str_replace(" ", "", $this->buf2[0]); $this->buf2[0] = strip_tags($this->buf2[0]); $this->buf1 = explode ( ";", $this->buf2[0]); $this->varToImport['regisseure'] = array(); for ( $i=1; $i<count($this->buf1); $i++ ) { $this->varToImport['regisseure'][$i-1] = $this->buf1[$i-1]; } // Schauspieler $search = "<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Darsteller:"; $this->buf1 = explode( $search, $this->siteBuf ); $this->buf2 = explode( "</tr>", $this->buf1[1] ); $this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]); $this->buf2[0] = str_replace(" ", "", $this->buf2[0]); $this->buf2[0] = strip_tags($this->buf2[0]); $this->buf1 = explode ( ";", $this->buf2[0]); $this->varToImport['actors'] = array(); for ( $i=1; $i<count($this->buf1); $i++ ) { $this->varToImport['actors'][$i-1] = $this->buf1[$i-1]; }
Code: Alles auswählen
// Schauspieler
$search = "<td nowrap><font face=\"Arial,Helvetica,sans-serif\" size=\"2\" class=\"Normal\">Darsteller:";
$this->buf1 = explode( $search, $this->siteBuf );
$this->buf2 = explode( "</tr>", $this->buf1[1] );
$this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]);
$this->buf2[0] = str_replace(" ", "", $this->buf2[0]);
$this->buf2[0] = strip_tags($this->buf2[0]);
$this->buf1 = explode ( ";", $this->buf2[0]);
$this->varToImport['actors'] = array();
for ( $i=1; $i<count($this->buf1); $i++ ) {
if ($this->buf1[$i-1] != "...[mehr]") $this->varToImport['actors'][$i-1] = $this->buf1[$i-1];
}
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast