Foutmelding PHP 5.4

Gestart doorMarv13 reacties25 weergaven

14 berichten · pagina 1 van 1

Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Hello,

Ik heb een probleempje met een Wat draait er nu script.

ik krijg deze melding:

Fatal error: Call-time pass-by-reference has been removed in


Op deze regel:

$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);


iemand die ff wil kijken?

Alvast bedankt.
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
komt door die & tekens voor je variabelen. Tegenwoordig moet je niet bij het meesturen van variabelen de pass-by-reference gebruiken, maar moet dat bij je functie.

Als:
function test ( &$een, &$twee )
{
$een = $twee;
$twee = md5($een);
}

Correct me if Im wrong..
0
Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Sjoerd schreef:
komt door die & tekens voor je variabelen. Tegenwoordig moet je niet bij het meesturen van variabelen de pass-by-reference gebruiken, maar moet dat bij je functie.

Als:
function test ( &$een, &$twee )
{
$een = $twee;
$twee = md5($een);
}

Correct me if Im wrong..
Snap er nog steeds niks van? redface
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als je gewoon het &-teken weghaalt, zou die moeten werken redface
0
Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Shoutcast Server Stats
// Parses shoutcasts xml to make an effective stats thing for any website
// ©2004-2005 Daniel Brown http://www.gmtt.co.uk
// Please refer to the readme file for use.


// Add-On MAXLISTNERS insead of the / 10 MAXLISTENERS which was set, and the BITRATE add-on.
// Online and Offline graphics, and add-on code.
// Better HTML Script.

// Do Not Try To Edit This Only Unless You Know What Youre Doing!!!!!!![/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config_radio.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$scfp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/fsockopen"]fsockopen[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"$scip"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$scport[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$errno[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$errstr[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]30[/COLOR][COLOR= #007700]);[/COLOR]
 [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$scfp[/COLOR][COLOR= #007700]) {[/COLOR]
  [COLOR= #0000BB]$scsuccs[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$scdef[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000] is Offline[/COLOR][COLOR= #007700]; 
 }[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$scsuccs[/COLOR][COLOR= #007700]!=[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]
 [URL="http://www.php.net/fputs"]fputs[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$scfp[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0rnUser-Agent: SHOUTcast Song Status (Mozilla Compatible)rnrn"[/COLOR][COLOR= #007700]);[/COLOR]
 [URL="http://www.php.net/while"]while[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/feof"]feof[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$scfp[/COLOR][COLOR= #007700])) {[/COLOR]
  [COLOR= #0000BB]$page[/COLOR] [COLOR= #007700].=[/COLOR] [URL="http://www.php.net/fgets"]fgets[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$scfp[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]1000[/COLOR][COLOR= #007700]);
 }[/COLOR]
[COLOR= #FF8000]######################################################################################################################
/////////////////////////part 1 
//define  xml elements[/COLOR]
 [COLOR= #0000BB]$loop[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"STREAMSTATUS"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"BITRATE"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"SERVERTITLE"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"CURRENTLISTENERS"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"MAXLISTENERS"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"BITRATE"[/COLOR][COLOR= #007700]);[/COLOR]
 [COLOR= #0000BB]$y[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$loop[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$y[/COLOR][COLOR= #007700]]!=[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700]){[/COLOR]
  [COLOR= #0000BB]$pageed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/.*<$loop[$y]>/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$page[/COLOR][COLOR= #007700]);[/COLOR]
  [COLOR= #0000BB]$scphp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$loop[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$y[/COLOR][COLOR= #007700]]);[/COLOR]
  $[COLOR= #0000BB]$scphp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/</$loop[$y]>.*/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$pageed[/COLOR][COLOR= #007700]);[/COLOR]
  [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$loop[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$y[/COLOR][COLOR= #007700]]==[/COLOR]SERVERGENRE [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$loop[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$y[/COLOR][COLOR= #007700]]==[/COLOR]SERVERTITLE [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$loop[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$y[/COLOR][COLOR= #007700]]==[/COLOR]SONGTITLE [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$loop[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$y[/COLOR][COLOR= #007700]]==[/COLOR]SERVERTITLE[COLOR= #007700])[/COLOR]
   $[COLOR= #0000BB]$scphp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/urldecode"]urldecode[/URL][COLOR= #007700]([/COLOR]$[COLOR= #0000BB]$scphp[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]// uncomment the next line to see all variables
//echo$.$scphp. = .$$scphp.<br>;[/COLOR]
  [COLOR= #0000BB]$y[/COLOR][COLOR= #007700]++;
 }[/COLOR]
[COLOR= #FF8000]//end intro xml elements
######################################################################################################################
######################################################################################################################
/////////////////////////part 2
//get song info and history[/COLOR]
 [COLOR= #0000BB]$pageed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/.*<SONGHISTORY>/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$page[/COLOR][COLOR= #007700]);[/COLOR]
 [COLOR= #0000BB]$pageed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/<SONGHISTORY>.*/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$pageed[/COLOR][COLOR= #007700]);[/COLOR]
 [COLOR= #0000BB]$songatime[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"<SONG>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$pageed[/COLOR][COLOR= #007700]);[/COLOR]
 [COLOR= #0000BB]$r[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$songatime[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$r[/COLOR][COLOR= #007700]]!=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]){[/COLOR]
  [COLOR= #0000BB]$t[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$r[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]
  [COLOR= #0000BB]$playedat[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/.*<PLAYEDAT>/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$songatime[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$r[/COLOR][COLOR= #007700]]);[/COLOR]
  [COLOR= #0000BB]$playedat[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/</PLAYEDAT>.*/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$playedat[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]]);[/COLOR]
  [COLOR= #0000BB]$song[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/.*<TITLE>/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$songatime[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$r[/COLOR][COLOR= #007700]]);[/COLOR]
  [COLOR= #0000BB]$song[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/</TITLE>.*/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$song[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]]);[/COLOR]
  [COLOR= #0000BB]$song[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/urldecode"]urldecode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$song[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]]);[/COLOR]
  [COLOR= #0000BB]$dj[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/.*<SERVERTITLE>/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$page[/COLOR][COLOR= #007700]);[/COLOR]
  [COLOR= #0000BB]$dj[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$t[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/</SERVERTITLE>.*/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$pageed[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$r[/COLOR][COLOR= #007700]++;
 }[/COLOR]
[COLOR= #FF8000]//end song info[/COLOR]
[URL="http://www.php.net/fclose"]fclose[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$scfp[/COLOR][COLOR= #007700]);
}[/COLOR]

[COLOR= #FF8000]//display stats[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$streamstatus[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"1"[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #FF8000]//you may edit the html below, make sure to keep variable intact[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]
<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel=stylesheet href="" type="text/css">
<title>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$scdef[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</title>
</head>
<center>
<body text="" bgcolor="">
<font color="#FFFFFF">
<img src="online.jpg"><br>
 [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$servertitle[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]<br>
<marquee>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$song[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</marquee></p><b>
</font>
    <a href="http://cdn.cloudrad.io/piratenradar/listen.pls">
    <img src="http://centova1.cpcustomer.com/system/images/tunein-pls.png" alt="Winamp" title="Winamp" align="absMiddle" border="0" height="16" width="16"></a>
    <a href="http://cdn.cloudrad.io/piratenradar/listen.asx">
    <img src="http://centova1.cpcustomer.com/system/images/tunein-asx.png" alt="windows Media Player" title="Windows Media Player" align="absMiddle" border="0" height="16" width="16"></a>
    <a href="http://cdn.cloudrad.io/piratenradar/listen.ram">
    <img src="http://centova1.cpcustomer.com/system/images/tunein-ram.png" alt="Real Player" title="Real Player" align="absMiddle" border="0" height="16" width="16"></a>
    <a href="http://cdn.cloudrad.io/piratenradar/listen.qtl">
    <img src="http://centova1.cpcustomer.com/system/images/tunein-qtl.png" alt="QuickTime" title="QuickTime" align="absMiddle" border="0" height="16" width="16"></a>
</p>
</body>

</html>[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$streamstatus[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"0"[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]//you may edit the html below, make sure to keep variable intact[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]
<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel=stylesheet href="" type="text/css">
<title>Radio Server Is Offline</title>
</head>

<body text="" bgcolor="">
<center>
<img src="offline.jpg">
</body>
</center>
</html>[/COLOR][COLOR= #007700];
}[/COLOR]
?>


Nu heb ik alles aangepast wat moest, en nu laat hij niks meer zien? redface
0
Berichten
3.074
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het is verouderd... Gebruik str_replace() of preg_replace() (Correct me if Im wrong).
0
Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Ja had ik net door..

Check mijn edit plz...
0
Berichten
3.074
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Marvinguich schreef:
Ja had ik net door..

Check mijn edit plz...
Jouw edit is nieuwer dan mijn bericht hoor. yummie
0
Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Joeey schreef:
Eerdere citaten tonen
Marvinguich schreef:
Ja had ik net door..
Check mijn edit plz...

Jouw edit is nieuwer dan mijn bericht hoor. yummie
Ja, ik zeg toch dat ik dat net door had, ik vraag mensen om ff te kijken naar mijn edit ;(
0
Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
bumpy de bumpyride..
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Marvinguich schreef:
bumpy de bumpyride..
Let op: De laatste post in dit topic was ook van jou. Je kunt waarschuwingsprocenten krijgen voor dubbelposts. Er is één dubbelpost per topic toegestaan, mits er minimaal 24 uur tussen die twee posts zit.
0
Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Xjessex schreef:
Eerdere citaten tonen
Marvinguich schreef:
bumpy de bumpyride..
Let op: De laatste post in dit topic was ook van jou. Je kunt waarschuwingsprocenten krijgen voor dubbelposts. Er is één dubbelpost per topic toegestaan, mits er minimaal 24 uur tussen die twee posts zit.
Zeur niet.. je post draagt niks bij aan mijn topic.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Eigen rechter spelen lijkt me niet zo verstandig, Marvinguich ... wink
0
Marv

Lid · Topicstarter

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Aarclay schreef:
Eigen rechter spelen lijkt me niet zo verstandig, Marvinguich ... wink
Help me liever dan te klagen over mijn binnen 24 uurs post..

Ik zoek wel een ander shoutcast scriptje als je toch niet kunt helpen confused
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren