• Welcome to Valhalla Legends Archive.
 

[PHP] PHP Errors.

Started by AC_Drkan, November 02, 2004, 07:49 PM

Previous topic - Next topic

AC_Drkan

Geez i hate debugging,

Parse error: parse error, unexpected T_VARIABLE in /Spam-East.php on line 9

with the following code:

<?phpEcho("Starting Battle.net Bot.....");SpamEast();function SpamEast() {	$Server = "Useast.Battle.Net";	$Port = 6112	$username = "";	$password = "";	$terminate = false;	$abort = false;	$timeout = 10;	$skipa = 1;	$spammessage1 = "Hey Testing Testing Testing";		$Connection = fsockopen("tcp://".$Server, $Port, $Errno, $Errstr, $timeout);		if (!Connection) {		$terminate = true;		$reason = "Connection To Battle.net Failed";	}	if (!$terminate) {		$chat = chr(3).chr(4);		$enter = chr(10).chr(13);		fputs($connection, $constr);		fputs($connection, $username);		fputs($connection, $password);		while (!$abort && $skipa != 0) {			if (false === ($info = fgets($connection))) {				$abort = true;				$terminate = true;				$reason = "Socket Read Failed. Reason: ".socket_strerror($ret);			}			$refuse = strpos($info, "refused");			if ($refuse) {				$abort = true;				$terminate = true;				$reason = "Connection Was Refused.";			}			$badlogin = strpos($info, "Login Incorrect");			if ($badlogin) {				$abort = true;				$terminate = true;				$reason = "Login Incorrect";			}			$tmp = substr($info, 0 , 4);			$tmp = "a$tmp";			$res = strpos($info, "2000");						if (strpos($tmp, "2000")) {				$skipa ++;			}			$sd++;			if ($sd = 40) {				$abort = true;				$terminate = true;				$reason = "Server Timed Out";			}		}	}	if (!$terminate) {		fputs($connection, "/join Open Tech Support".$enter);		$skipa = 1;		$abort = false;		$sd = 0;				while ($skipa != 0 && !$abort) {			$info = fgets($connection);			$tmp = substr($info, 0, 4);			$tmp = "a$tmp";						if (strpos($tmp, "2000")) {				fputs($connection, $spammessage1.$enter);			}		}	}	if ($connection != "") {		fclose($connection);	}		if (!terminate) {		echo retu;	} else {		$error = "Abort ".$reason);		echo $error;	}}


Basically a modified version of the get stats function thats i tried to make it infinately loop.

"The Arguments of Today Result in the Wars of Tomorrow" - Quote By Muah.
<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking "What the hell is this guy doing?"

<kow`> "There are 10 types of people in the world... those who understand binary and those who don't."
<SpaceRain> That's only 2 types of people, kow.
<SpaceRain> STUPID


<[TN]FBMachine> i got kicked out of barnes and noble once for moving all the bibles into the fiction section

God i love Bash.org.

MyndFyre

Quote from: AC_Drkan on November 02, 2004, 07:49 PM
Geez i hate debugging,
Then don't try to program.
Quote from: AC_Drkan on November 02, 2004, 07:49 PM

Parse error: parse error, unexpected T_VARIABLE in /Spam-East.php on line 9

with the following code:

<?phpEcho("Starting Battle.net Bot.....");SpamEast();function SpamEast() {	$Server = "Useast.Battle.Net";	$Port = 6112	$username = "";


Line 8 does not terminate with a semicolon.  It should read:


function SpamEast() {
$Server = "Useast.Battle.Net";
$Port = 6112;
$username = "";
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

CrAzY

Why spam Battle.net? People like you make the internet a very bad place.
CrAzY

j0k3r

Quote from: CrAzY on November 08, 2004, 04:47 PM
Why spam Battle.net? People like you make the internet a very bad place.
Actually, people like him is what the internet is for. It's morons that use bots to spam crap that are the problem, not the ones making the programs.

Also, it's harmful to battle.net, not the internet.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

AC_Drkan

Ahh im starting a clan script hosting business and i want to get my website out on battle.net and since im on Dailup its kinda hard to do that.

:(
"The Arguments of Today Result in the Wars of Tomorrow" - Quote By Muah.
<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking "What the hell is this guy doing?"

<kow`> "There are 10 types of people in the world... those who understand binary and those who don't."
<SpaceRain> That's only 2 types of people, kow.
<SpaceRain> STUPID


<[TN]FBMachine> i got kicked out of barnes and noble once for moving all the bibles into the fiction section

God i love Bash.org.

venox

Are you planning to run this on a localhost?  I'm sure you are aware of the execution timeout setting... it's defaulted to 30 seconds.  If you plan to have this script connecting to bnet for longer than that.. you'll need to edit that setting.  If you are planning to run this from a server that you don't own/administrate then you will have little success getting this to work.  It'll connect for 30 seconds and then time out and disconnect....

And if you are running it from a localhost, that's pretty pointless; you can just use a bot instead of running a server and this script.

AC_Drkan

Quote from: venox on November 09, 2004, 04:20 PM
Are you planning to run this on a localhost?  I'm sure you are aware of the execution timeout setting... it's defaulted to 30 seconds.  If you plan to have this script connecting to bnet for longer than that.. you'll need to edit that setting.  If you are planning to run this from a server that you don't own/administrate then you will have little success getting this to work.  It'll connect for 30 seconds and then time out and disconnect....

And if you are running it from a localhost, that's pretty pointless; you can just use a bot instead of running a server and this script.

im on dial up, its pointless, im on like for 2 hours each day.
"The Arguments of Today Result in the Wars of Tomorrow" - Quote By Muah.
<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking "What the hell is this guy doing?"

<kow`> "There are 10 types of people in the world... those who understand binary and those who don't."
<SpaceRain> That's only 2 types of people, kow.
<SpaceRain> STUPID


<[TN]FBMachine> i got kicked out of barnes and noble once for moving all the bibles into the fiction section

God i love Bash.org.

LivedKrad

I'd say it's a moderately good learning opportunity for people that would like to lightly see how sockets work, venox. Aside from that avenue of justification, it's a crap idea. :P