I have put together this script:
PHP Code:
<html>
<head>
<title>Auto Updater: Shoutcast Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="refresh" content="5">
</head>
<body BGColor=#FFFFFF Text=#000000 link="blue" vlink="blue"><font face="arial,helvetica" size=-1>
<script type="text/javascript" language="JavaScript">
window.onload = function (){window.onload={};document.title.submit();}
</script>
</font><font face="Arial" size=-1>
Shoutcast auto title updater.</font>
<font face="Arial" size="-1">By Brett P. </font></p>
<font face="arial,helvetica" size=-1>
<form action="http://2**.69.181.171:****/admin.cgi?" ENCTYPE="multipart/form-data" method="GET" name="title" target="I1"><font face="arial, helvetica" size=-1>[b]
<input type="hidden" name="pass" value="*****">
<input type="hidden" name="mode" value="updinfo">
Current Track:
<input type="text" name="song" value="<?php include("../XMLSongs.php"); ?>" size="57">
<input type="submit" value=" Manual Update Title">
</font>[/b]</form>
[b]* Title information will automatically gather and update every 30 seconds.[/b]</font>
<iframe name="I1" src="spitout.php" border="0" frameborder="0" width="610" height="1">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p>
</body>
</html>
It's job is to basicly gather data from a plain text file (xmlsongs.php), and submit it to the server. It is a shoutcast server and this tool is used to update the Song playing field. It works good except for every space it displays it as a +. I understand this has to do with encoding. I need to replace each space with instead. Not %20.
I tried many things, I got close with being able to change any spaces with the subsitution of my choice () . But I do not know how to make it automaticly convert the spaces. I hope I am not being confusing. Any help is welcomed.