I never could get it to work with echo. I am now trying to use fwrite and I am VERY close now. Only problem is that I get the following error:
Warning: fwrite(): supplied argument is not a valid stream resource in /home/cavyseek/public_html/forums/test.php on line 60
Warning: fclose(): supplied argument is not a valid stream resource in /home/cavyseek/public_html/forums/test.php on line 63
Here is the got that is in use:
PHP Code:
<?php
$fp = fopen("default.xml","r+");
if(!$fp) {
print "error! The file could not be opened";
exit;
}
require_once('./global.php');
$line1='<?xml version="1.0" encoding="ISO-8859-1"?>';
$line2='<parameters>';
$line3='<!-- Connection Related -->';
$line4='<param name="NickName" value="Cavy Compendium Chat User" />';
$line5='<param name="RealName" value="GojIRC User Cavy Compendium Chat" />';
$line6='<param name="ServerPort" value="6667" />';
$line7='<param name="UserName" value="$bbuserinfo[username]" />';
$line8='<param name="HostName" value="jpilot" />';
$line9='<param name="SocksAddress" value="" />';
$line10='<param name="LicenseKey"
value="v3:cavycompendium.com:8245569950230102224294323703820230025522606270733084936176424795322000355489466596964134808
984183857372050536885065353580205103173037798985484442049424084">';
$line11='<!-- GUI Sates Control -->';
$line12='<param name="DirectStart" value="true" />';
$line13='<param name="DisplayConfigChannel" value="false" />';
$line14='<param name="DisplayConfigRealName" value="false" />';
$line15='<param name="DisplayConfigPort" value="false" />';
$line16='<param name="DisplayConfigMisc" value="false" />';
$line17='<param name="DisplayConfigSocks" value="false" />';
$line18='<param name="DisplayColorControl" value="true" />';
$line19='<param name="DisplayAbout" value="false" />';
$line20='<param name="RefreshColorCode" value="true" />';
$line21='<param name="AllowURL" value="true" />';
$line22='<param name="AllowShowURL" value="true" />';
$line23='<param name="AllowHyperLink" value="true" />';
$line24='<param name="isLimitedServers" value="true" />';
$line25='<param name="isLimitedChannels" value="true" />';
$line26='<param name="UseModeIcons" value="true" />';
$line27='<param name="UserPrefixCommand" value="aohv" />';
$line28='<param name="UserPrefixSymbol" value="!@%+" />';
$line29='<param name="ScreenBufferPageSize" value="3" />';
$line30-'<param name="LogoGifName" value="IRClogo.gif" />';
$line31='<param name="LogoWidth" value="77" />';
$line32='<param name="LogoHeight" value="145" />';
$line33='<param name="URLWindowName" value="popShow" />';
$line34='<param name="PWindowHeight" value="200" />';
$line35='<param name="PWindowWidth" value="400" />';
$line36='<!-- Miscelaneous -->';
$line37='<param name="WelcomeMessage" value="Welcome to the Cavy Compendium Chat!" />';
$line38='<param name="AliasList" value="/m=/msg,/t=/topic,/n=/nick" />';
$line39='<param name="AcceptCommands" value="true" />';
$line40='<!-- 2.8 -->';
$line41='<param name="UseImageButton" value="true" />';
$line42='<param name="UserMenuList" value="Send File=/dccsend $bbuserinfo[username],Private Message=/msg
$bbuserinfo[username],Ignore=/ignore $bbuserinfo[username],Whois=/whois $bbuserinfo[username],See User
Profile=/showprofile $bbuserinfo[username]" />';
$line43='<param name="AllowAddressDisplay" value="false" />';
$line44='<param name="AllowDCCTransfer" value="true" />';
$line45='<param name="CopyMethod" value="JVM" />';
$line46='</parameters>';
fwrite($fp, $line1);
fclose($fp);
?>
I really did not want to dwelve this deep into PHP because I really don't have the time. I can't find anyone to hire this project out to in a timely fashion, so I don't have much choice in the matter.