Yeah, I did some more work on it, and I'm using PHP echos now for the events, but this damn type mismatch has me stumped (echo type mismatch).
EDIT: Holy crap, nice coloring. The first part, atleast, is nice. Then it goes all ewwy black? Oh wellz.
<?php
<html>
<head>
<title>HTML Webbot</title>
<object classid='clsid:CB1619E4-0752-44A6-9828-CE58616BC8FE' id="CSB" width='168' height='16'></object>
<script language="VBScript">
Public CDKey
Public Username
Public Password
Public Product
Public Server
Public Home
Public Screen
Connect
Sub GetConf()
Username = InputBox("Username?")
Password = InputBox("Password?")
Product = InputBox("Product (4-Byte Reversed)?")
Server = InputBox("Server?")
CDKey = InputBox("Key?")
Home = InputBox("Home channel?")
End Sub
Sub SetConf()
With CSB
.Accept = 579728
.Username = Username
.Password = Password
.Product = Product
.Server = Server
.CDKey = CDKey
.HomeChannel = Home
End With
End Sub
Public Sub Connect()
Document.Write("HTML Webbot by Joe[x86] loaded.")
GetConf
SetConf
CSB.Connect
End Sub
</script>
<script for="CSB" event="BnetConnected">
echo '[BNCS] Connected!';
</script>
<script for="CSB" event="BnetConnecting">
echo '[BNCS] Connecting..';
</script>
<script for="CSB" event="BnetDisconnected">
echo '[BNCS] Disconnected!';
</script>
<script for="CSB" event="BnetError">
echo '[BNCS] Error ' + ErrorNumber + ': ' + Description + '.';
</script>
<script for="CSB" event="BNLSAuthEvent">
echo '[BNLS] Auth Event - ' + Success;
</script>
<script for="CSB" event="BNLSConnected">
echo '[BNLS] Connected!';
</script>
<script for="CSB" event="BNLSConnecting">
echo '[BNLS] Connecting..';
</script>
<script for="CSB" event="BNLSDataError">
Select Case Message
Case 1
echo '[BNLS] Bad CD-Key.';
Case 2
echo '[BNLS] Bad Product Version.';
Case 3
echo '[BNLS] Bad NLS Version.';
Case Else
echo [BNLS] Data Error: Unhandled Byte: ' + Message + '.';
End Select
</script>
<script for="CSB" event="BNLSError">
echo '[BNLS] Error ' + ErrorNumber + ': ' + Description + '.';
</script>
<script for="CSB" event="JoinedChannel">
echo '[BNCS] Joined Channel ' + ChanelName + '.';
</script>
<script for="CSB" event="LoggedOnAs">
echo '[BNCS] Logged on as ' + Username + ' using ' + Product + '.';
</script>
<script for="CSB" event="LogonEvent">
Select Case Message
Case Else
echo '[BNCS] Logon Event: Unhandled Byte -- ' + Message + '.';
End Select
</script>
<script for="CSB" event="News">
echo '[BNCS] News: ' + News;
</script>
<script for="CSB" event="ServerError">
echo '[BNCS] Error: ' + Message;
</script>
<script for="CSB" event="ServerInfo">
echo '[BNCS] Info: ' + Message;
</script>
<script for="CSB" event="UserEmote">
echo Username + ' (Emote): ' + Message;
</script>
<script for="CSB" event="UserInChannel">
echo Username + ' is in the channel using ' + Product + ' with a ping of ' + Ping + '.';
</script>
<script for="CSB" event="UserJoins">
echo Username + ' has joined the channel using ' + Product + '.';
</script>
<script for="CSB" event="UserLeaves">
echo Username + ' has left the channel.';
</script>
<script for="CSB" event="UserTalk">
echo Username + ': ' + Message;
</script>
<script for="CSB" event="VersionCheck">
Select Case Message
Case Else
echo '[BNLS] Version Check: Unhandled Byte -- ' + Message + '. ExtraInfo: ' + ExtraInfo;
End Select
</script>
<script for="CSB" event="WhisperFromUser">
echo Username + ' (Whisper): ' + Message;
</script>
<script for="CSB" event="WhisperToUser">
echo 'You whisper to ' + Username + ': ' + Message;
</script>
</head>
</html>
?>
You're probaly going to want to change the script timeout time to 0.
How ya do that? :P
http://ca.php.net/set_time_limit
*notes this isnt HTML*
*pokes the php tag*
*pokes the VBS tag*
Although I agree with you...
*pokes the HTML tag*
php evenutally equals html after its executed.
Quote from: Blaze on April 07, 2005, 06:10 PM
php evenutally equals html after its executed.
No it doesn't.
Then was does it become?
Quote from: Blaze on April 07, 2005, 06:32 PM
Then was does it become?
It's PHP. I think that's what he's trying to get at, anyway.
I'm somewhat unclear as to why this has PHP tags at all. It would work the same whether it was on a server that had a PHP interpreter or not. Specifically, it would require that the user has a CSB OCX file installed on his local machine. So, why put the additional demand of a PHP interpreter when you're doing absolutely nothing *with* the PHP? Seems silly.
Quote from: Blaze on April 07, 2005, 06:32 PM
Then was does it become?
Anything programtically possible in the boundries of PHP.
Take a function for example...what does time() result in after it's done executing? Sure doesn't result in HTML IIRC. You have to echo the results of time as I recall for it to be displayed as HTML.
He's talking about the end ouput of websites which indeed becomes HTML. Since PHP is a server side language the output is not viewed in its original PHP format.
It still isn't HTML. If I don't echo() anything to the user they sure as hell don't get any HTML. Or for that matter I could echo something that isn't HTML (such as an image file), and PHP != HTML still.