Autor Zpráva
psichox
Profil
dobrý den když vložím tento kod do php
<script type='text/javascript'> 
var newwindow;
function poptastic(url)
{
	newwindow=window.open(url,'name','height=178,width=324');
	if (window.focus) {newwindow.focus()}
}
</script> 
<a href="javascript:poptastic('player.php');"> 
<img src="play.png" alt="" border="0">  
 </a>

píše že mam chybně uvozovky když se to pokusím opravit tak php nic nepíše ale kod nejde můžete poradit s tima uvozovkama ? nebo navrhnout něco jiného ?
Lechy
Profil
psichox:
uvozovky máš správně
psichox
Profil
no to asi jo no ale php si to nemyslí :-)
psichox
Profil
tady je celý kod
<?php

$scdef  =       "bla";
$scip   =       "bla";
$scport =       "bla";
$scpass =       "bla";
$refreshrate =  "bla";
$bgcolor =      "bla";
/* SERVER */
$scfp = fsockopen("$scip", $scport); 
 if(!$scfp) { 
  $scsuccs=1; 
echo''.$scdef.'<i>Selhalo připojení s radio serverem, Kontaktujte prosím administrátora.</i>';
 } 
if($scsuccs!=1){
 fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
 while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
 }
 $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS", "ICQ", "IRC" , "AIM");
 $y=0;
 while($loop[$y]!=''){
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page);
  $scphp = strtolower($loop[$y]);
  $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE || $loop[$y]==AIM)
   $$scphp = urldecode($$scphp);
//echo'$'.$scphp.' = '.$$scphp.'<br>';
  $y++;
 }
/* READING... */
 $pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
 $pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
 $songatime = explode("<SONG>", $pageed);
 $r=1;
 while($songatime[$r]!=""){
  $t=$r-1;
  $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
  $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
  $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
  $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
  $song[$t] = urldecode($song[$t]);
  $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
  $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
 }
fclose($scfp);
}
echo'
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="style.css" type="text/css"> 
</head>



<script type='text/javascript'> 
var newwindow;
function poptastic(url)
{
    newwindow=window.open(url,'name','height=178,width=324');
    if (window.focus) {newwindow.focus()}
}
</script> 
<a href="javascript:poptastic('player.php');"> 
<img src="play.png" alt="" border="0">  
 </a>

 
</body>';
?>
_es
Profil
psichox:
Daj ten JS kód mimo <?php ?>.
psichox
Profil
přes echo
Velda
Profil
psichox:
<?php
/**********************
* SHOUTCAST NASTAVENI *
***********************/
$scdef  =       "bla";
$scip   =       "bla";
$scport =       "bla";
$scpass =       "bla";
$refreshrate =  "bla";
$bgcolor =      "bla";
/* SERVER */
$scfp = fsockopen("$scip", $scport); 
 if(!$scfp) { 
  $scsuccs=1; 
echo''.$scdef.'<i>Selhalo připojení s radio serverem, Kontaktujte prosím administrátora.</i>';
 } 
if($scsuccs!=1){
 fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
 while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
 }
 $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS", "ICQ", "IRC" , "AIM");
 $y=0;
 while($loop[$y]!=''){
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page);
  $scphp = strtolower($loop[$y]);
  $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE || $loop[$y]==AIM)
   $$scphp = urldecode($$scphp);
//echo'$'.$scphp.' = '.$$scphp.'<br>';
  $y++;
 }
/* READING... */
 $pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
 $pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
 $songatime = explode("<SONG>", $pageed);
 $r=1;
 while($songatime[$r]!=""){
  $t=$r-1;
  $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
  $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
  $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
  $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
  $song[$t] = urldecode($song[$t]);
  $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
  $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
 }
fclose($scfp);
}?>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="style.css" type="text/css"> 
</head>



<script type='text/javascript'> 
var newwindow;
function poptastic(url)
{
    newwindow=window.open(url,'name','height=178,width=324');
    if (window.focus) {newwindow.focus()}
}
</script> 
<a href="javascript:poptastic('player.php');"> 
<img src="play.png" alt="" border="0">  
 </a>

 
</body>;
psichox
Profil
to nic neřeší já to potřebuju v tom protože to mam obalený kodama
Velda
Profil
psichox:
co? kde? jak?
psichox
Profil
já sem ty kody sundal z toho ale jinak tam mam kody kde sou zadaný hodnoty z php a když to udělam podle tebe rozhodí to web
Velda
Profil
psichox:
takže si nám nedal celý kód?
_es
Profil
psichox:
já sem ty kody sundal z toho ale ….
Máš to rozbité.
psichox
Profil
tady je celý
<?php

$scdef  =       "bla";
$scip   =       "bla";
$scport =       "bla";
$scpass =       "bla";
$refreshrate =  "bla";
$bgcolor =      "bla";
/* SERVER */
$scfp = fsockopen("$scip", $scport); 
 if(!$scfp) { 
  $scsuccs=1; 
echo''.$scdef.'<i>Selhalo připojení s radio serverem, Kontaktujte prosím administrátora.</i>';
 } 
if($scsuccs!=1){
 fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
 while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
 }
 $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS", "ICQ", "IRC" , "AIM");
 $y=0;
 while($loop[$y]!=''){
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page);
  $scphp = strtolower($loop[$y]);
  $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE || $loop[$y]==AIM)
   $$scphp = urldecode($$scphp);
//echo'$'.$scphp.' = '.$$scphp.'<br>';
  $y++;
 }
/* READING... */
 $pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
 $pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
 $songatime = explode("<SONG>", $pageed);
 $r=1;
 while($songatime[$r]!=""){
  $t=$r-1;
  $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
  $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
  $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
  $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
  $song[$t] = urldecode($song[$t]);
  $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
  $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
 }
fclose($scfp);
}
echo'
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="style.css" type="text/css"> 
</head>
<center> 
<div id="header"> 
<div id="header-wrap"> 
<div id="banner-468-top">Reklamní plocha k pronájmu! (Banner 468x60px)</div> 
<div id="play-box"> 
<div id="left-part"> 
<div id="foto-play"><img src="'.$aim.'.png"></div> 
<script type='text/javascript'> 
var newwindow;
function poptastic(url)
{
	newwindow=window.open(url,'name','height=178,width=324');
	if (window.focus) {newwindow.focus()}
}
</script> 
<a href="javascript:poptastic('player.php');"> 
<img src="play-button.png" alt="PLAY!" title="PLAY!" id="play-button" >
 </a>

</div> 
<div id="music-info"> 
<div align="left"><font color=#ff7c00 ><b>Moderuje : DJ-'.$aim.'<br />
Icq : '.$icq.'<br />
Pořad : '.$irc.'<br />
<marquee>'.$song[0].'<br /></marquee>
</b></font>
</div>
</div> 
</div> 
</div>    
</div>




 
</body>';
?>
Velda
Profil
psichox:
<?php

$scdef  =       "speedradio.kx.cz";
$scip   =       "80.79.29.122";
$scport =       "8111";
$scpass =       "nakatomi";
$refreshrate =  "10";
$bgcolor =      "#000000";
/* SERVER */
$scfp = fsockopen("$scip", $scport); 
 if(!$scfp) { 
  $scsuccs=1; 
echo''.$scdef.'<i>Selhalo připojení s radio serverem, Kontaktujte prosím administrátora.</i>';
 } 
if($scsuccs!=1){
 fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
 while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
 }
 $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS", "ICQ", "IRC" , "AIM");
 $y=0;
 while($loop[$y]!=''){
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page);
  $scphp = strtolower($loop[$y]);
  $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE || $loop[$y]==AIM)
   $$scphp = urldecode($$scphp);
//echo'$'.$scphp.' = '.$$scphp.'<br>';
  $y++;
 }
/* READING... */
 $pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
 $pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
 $songatime = explode("<SONG>", $pageed);
 $r=1;
 while($songatime[$r]!=""){
  $t=$r-1;
  $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
  $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
  $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
  $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
  $song[$t] = urldecode($song[$t]);
  $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
  $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
 }
fclose($scfp);
}?>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="style.css" type="text/css"> 
</head>
<center> 
<div id="header"> 
<div id="header-wrap"> 
<div id="banner-468-top">Reklamní plocha k pronájmu! (Banner 468x60px)</div> 
<div id="play-box"> 
<div id="left-part"> 
<div id="foto-play"><img src="<?php echo $aim ?>.png"></div> 
<script type='text/javascript'> 
var newwindow;
function poptastic(url)
{
    newwindow=window.open(url,'name','height=178,width=324');
    if (window.focus) {newwindow.focus()}
}
</script> 
<a href="javascript:poptastic('player.php');"> 
<img src="play-button.png" alt="PLAY!" title="PLAY!" id="play-button" >
 </a>

</div> 
<div id="music-info"> 
<div align="left"><font color=#ff7c00 ><b>Moderuje : DJ-<?php echo $aim ?><br />
Icq : <?php echo $icq ?><br />
Pořad : <?php echo $irc ?><br />
<marquee><?php echo $song[0] ?><br /></marquee>
</b></font>
</div>
</div> 
</div> 
</div>    
</div>




 
</body>;
psichox
Profil
díky to mě nenapadlo
psichox
Profil
oprava de to

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: