Re: A kewl Script, for you someone to test, and show me the results

From: Date: Sun, 29 Jul 2001 10:58:58 +0000
Subject: Re: A kewl Script, for you someone to test, and show me the results
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-69275@lists.php.net to get a copy of this message
That just connects to port 27015 on the server, and sends the status command, or players command.... ----- Original Message ----- From: "Andrew Brampton" <andrew@bramp.freeserve.co.uk> To: "ReDucTor" <sjdtmv@tpg.com.au> Cc: <php-general@lists.php.net>; <php-general@phpbeginner.com> Sent: Saturday, September 29, 2001 8:47 PM Subject: Re: [PHP] A kewl Script, for you someone to test, and show me the results > NO, > Doesn't read the logs, actually connects to the HL server, and reads the > players/scores.. Programs like GameSpy do it.. its not that hard to actually > do.. I looked into it a while ago, and all you do is connect to the server, > send a simple command and it returns a list of players/scores, and you can > eventually reteive info like current map, time left, and all the server > settings... > > U can see a CGI Perl example of it here: > > http://www.half-life.ewetel.net/cgi-bin/hlds_ld.cgi?212.6.108.253:60010 > > Bramp > P.S I may have to make a script to do this for HL in PHP... would anyone > like that? > ----- Original Message ----- > From: "ReDucTor" <sjdtmv@tpg.com.au> > To: "Andrew Brampton" <andrew@bramp.freeserve.co.uk> > Cc: <php-general@lists.php.net>; <php-general@phpbeginner.com> > Sent: Saturday, September 29, 2001 5:12 AM > Subject: Re: [PHP] A kewl Script, for you someone to test, and show me the > results > > > But that isn't a HL Client, that is just reading the logs.... > ----- Original Message ----- > From: "Andrew Brampton" <andrew@bramp.freeserve.co.uk> > To: "ReDucTor" <sjdtmv@tpg.com.au> > Cc: <php-general@lists.php.net>; <php-general@phpbeginner.com> > Sent: Saturday, September 29, 2001 12:33 AM > Subject: Re: [PHP] A kewl Script, for you someone to test, and show me the > results > > > > heheh U can easily make a HL Client.. > > But instead of playing it would just report the match scores & players > > etc... > > There are ASP & CGI scripts that I know of that do this, I guess PHP could > > easily do it.. > > > > Andrew > > ----- Original Message ----- > > From: "ReDucTor" <sjdtmv@tpg.com.au> > > To: "Maxim Maletsky (PHPBeginner.com)" <php-general@phpbeginner.com>; > > "'Chris Lee'" <lee@mediawaveonline.com>; > > <php-general@lists.php.net> > > Sent: Friday, September 28, 2001 3:14 AM > > Subject: Re: [PHP] A kewl Script, for you someone to test, and show me the > > results > > > > > > Well I know the Holidays are near here, I might start to make a few little > > games... > > > > umm, whats a few games that could be done... > > > > lets all try and decode the hl networking code, and make hl clients in > > php....lol,. if someone can do this i will truly break my arm off and give > > it to them.... > > > > > > ----- Original Message ----- > > From: "Maxim Maletsky (PHPBeginner.com)" <php-general@phpbeginner.com> > > To: "'ReDucTor'" <sjdtmv@tpg.com.au>; "'Chris > > Lee'" > > <lee@mediawaveonline.com>; <php-general@lists.php.net> > > Sent: Friday, September 28, 2001 12:10 PM > > Subject: RE: [PHP] A kewl Script, for you someone to test, and show me the > > results > > > > > > > It's on my plans already for a while, > > > Check out who those domains belong to: > > > > > > phpgame.com > > > phpgames.com > > > php-game.com > > > php-games.com > > > > > > He he... > > > > > > Unfortunately I never have time. Only when my company needs a new little > > > video game to promote their magazine (also available as an online > > > publication) I offer to write for them some WAP enabled Hangman, little > > > puzzles and pretty crosswords :-) > > > > > > I played video games since I was 7 and that is what I owe my carrier to > > > - video game centers :-) > > > > > > > > > Maxim Maletsky > > > www.PHPBeginner.com > > > > > > > > > > > > -----Original Message----- > > > From: ReDucTor [mailto:sjdtmv@tpg.com.au] > > > Sent: venerdì 28 settembre 2001 4.01 > > > To: Maxim Maletsky (PHPBeginner.com); 'Chris Lee'; > > > php-general@lists.php.net > > > Subject: Re: [PHP] A kewl Script, for you someone to test, and show me > > > the results > > > > > > > > > I just changed it to not make such a big load > > > > > > > > > ne ways here it is > > > > > > <html> > > > <body bgcolor='000000' style='font-size: 1%'> > > > <?php > > > if(empty($char)) > > > $char = "W"; > > > echo "<img > > > src='http://$image'><br>"; > > > $im = ImageCreateFromPNG("http://$image"); > > > for($y = 0; $y < imagesy($im); $y++) > > > { > > > for($x = 0; $x < imagesx($im); $x++) > > > { > > > $color = ImageColorsForIndex($im, ImageColorAt($im, $x, $y)); > > > $red = $color['red']; > > > $green = $color['green']; > > > $blue = $color['blue']; > > > if($red != $oldred && $green != $oldgreen && $blue != $oldblue) > > > { > > > $oldred = $red; > > > $oldgreen = $green; > > > $oldblue = $blue; > > > echo "<font color='"; > > > printf("%02x%02x%02x",$color['red'],$color['green'],$color['blue']); > > > echo "'>".$char."</font>"; > > > } > > > else > > > echo $char; > > > } > > > echo '<br>'; > > > } > > > ?> > > > </body> > > > </html> > > > > > > Videogames in PHP, what fun, i know tons of things like tic tac toe, etc > > > have been made in php, would be nice to get a whole collecting of them > > > up, and just play around with them :D > > > ----- Original Message ----- > > > From: "Maxim Maletsky (PHPBeginner.com)" > > > <php-general@phpbeginner.com> > > > To: "'ReDucTor'" <sjdtmv@tpg.com.au>; "'Chris > > > Lee'" > > > <lee@mediawaveonline.com>; <php-general@lists.php.net> > > > Sent: Friday, September 28, 2001 11:57 AM > > > Subject: RE: [PHP] A kewl Script, for you someone to test, and show me > > > the results > > > > > > > > > > But truly, the only downline of this code is it's HUGE amount of HTML > > > > - good only for fun, pretty useless for real development, but it's > > > > damn fun and could be an inspiration for PHP video games, > > > > entertainment sites and so on. > > > > > > > > I really liked it. > > > > > > > > Hey, and I also love developing some silly video games in PHP - Then I > > > > > > > will show you guys who gets the medal :-) Oh well, it's open source > > > > anyway:-) > > > > > > > > Maxim Maletsky > > > > www.PHPBeginner.com > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: ReDucTor [mailto:sjdtmv@tpg.com.au] > > > > Sent: venerdì 28 settembre 2001 3.50 > > > > To: Maxim Maletsky (PHPBeginner.com); 'Chris Lee'; > > > > php-general@lists.php.net > > > > Subject: Re: [PHP] A kewl Script, for you someone to test, and show me > > > > > > > the results > > > > > > > > > > > > /me takes the gold medal and runs :D > > > > ----- Original Message ----- > > > > From: "Maxim Maletsky (PHPBeginner.com)" <php-general@phpbeginner.com> > > > > To: "'Chris Lee'" <lee@mediawaveonline.com>; > > > > <php-general@lists.php.net> > > > > Sent: Friday, September 28, 2001 11:37 AM > > > > Subject: RE: [PHP] A kewl Script, for you someone to test, and show me > > > > the results > > > > > > > > > > > > > Chris, that was very cool. > > > > > > > > > > An innocent addition to your tests - with this graphic it is all > > > > > looking > > > > > magic: > > > > > > > > > > Check your own site @ this URL: > > > > > http://www.mediawaveonline.com/test.php?image=www.libpng.org/pub/png > > > > > /i > > > > > mg > > > > > _png/pnglogo-blk-sml1.png > > > > > > > > > > IMPRESSIVE! > > > > > Gold medal to the inventor! (Tshering Norbu) > > > > > > > > > > > > > > > Maxim Maletsky > > > > > www.PHPBeginner.com > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Chris Lee [mailto:lee@mediawaveonline.com] > > > > > Sent: giovedì 27 settembre 2001 17.53 > > > > > To: php-general@lists.php.net > > > > > Subject: Re: [PHP] A kewl Script, for you someone to test, and show > > > > > me > > > > > > > > > the results > > > > > > > > > > > > > > > I found 'W' worked best to maintain aspect ratio, and minimize > > > > > the > > > > > font. > > > > > > > > > > http://www.mediawaveonline.com/test.php?image=www.atalasoft.com/Imag > > > > > es > > > > > /s > > > > > tefa > > > > > n_full_rgba.png > > > > > > > > > > <html> > > > > > <body bgcolor='000000' style='font-size: 1%'> > > > > > <?php > > > > > echo " > > > > > <img > > > > > src='http://$image'><br> > > > > > "; > > > > > $im = > > > > > ImageCreateFromPNG("http://$image"); > > > > > for($y = 0; $y < imagesy($im); $y++) > > > > > { > > > > > for($x = 0; $x < imagesx($im); $x++) > > > > > { > > > > > $color = ImageColorsForIndex($im, ImageColorAt($im, $x, $y)); > > > > > echo "<font color='"; > > > > > > > > > > > > > printf("%02x%02x%02x",$color['red'],$color['green'],$color['blue']); > > > > > echo "'>W</font>"; > > > > > } > > > > > echo '<br>'; > > > > > } > > > > > ?> > > > > > </body> > > > > > </html> > > > > > > > > > > this was defn a fun script haha. thanks guys. > > > > > > > > > > -- > > > > > > > > > > Chris Lee > > > > > lee@mediawaveonline.com > > > > > > > > > > > > > > > "Rasmus Lerdorf" <rasmus@php.net> wrote in message > > > > > > > > > > news:Pine.LNX.4.33.0109270046390.1491-100000@master.php.net... > > > > > > Oh, by the way, I modified your script a bit and made it load an > > > > > > indexed PNG file instead. This is the modified script: > > > > > > > > > > > > > > > > > > http://www.php.net/~rasmus/reductor.phps > > > > > > > > > > > > And here is the result: > > > > > > http://www.php.net/~rasmus/reductor.php > > > > > > > > > > > > Not sure why you used a $ sign for the character. It sort of > > > > > > throws > > > > > > > > > > off the aspect ratio. Try a # instead: > > > > > > > > > > > > http://www.php.net/~rasmus/reductor.php?ch=%23 > > > > > > > > > > > > -Rasmus > > > > > > > > > > > > On Thu, 27 Sep 2001, ReDucTor wrote: > > > > > > > > > > > > > Hey, > > > > > > > I couldn't be bothered waiting for someone to show me a host > > > > > > > that > > > > > runs > > > > > > > php with GD, so i am just going to post the code here, and hope > > > > > > > that > > > > > someone > > > > > > > sees it, and checks it out, and shows the results > > > > > > > > > > > > > > If you can't find a jpg file to test this on, just grab the php > > > > > > > jpg one, well i'll post the code now, so people can play > > > > > > > with > > > > > > > it, remember if you test it place show the results :D > > > > > > > > > > > > > > btw if you don't understand how to use it, you paste the > > > > > > > code > > > > > > > into > > > > > > > > > > > a > > > > > .php > > > > > > > file, and change imgname to the path of an jpg image, if you > > > > > > > want to > > > > > > > > > > > > use > > > > > an > > > > > > > png image, just change the im to ImageCreateFromPNG, ok, thats > > > > > all...please > > > > > > > show the results > > > > > > > > > > > > > > <html> > > > > > > > <body bgcolor="#000000"> > > > > > > > <?php > > > > > > > $imgname = "/path/to/a/jpeg/file"; > > > > > > > $im = ImageCreateFromJPEG($imgname); > > > > > > > $output = " "; > > > > > > > for($x=0;$x<imagesx($im);$x++) > > > > > > > { > > > > > > > for($y=0;$y<imagesy($im);$y++) > > > > > > > { > > > > > > > $color = ImageColorsForIndex(ImageColorAt($im, $x, $y)); > > > > > > > echo "<font size=\"1\" color=\"#"; > > > > > > > echo dechex($color['red']); > > > > > > > echo dechex($color['green']); > > > > > > > echo dechex($color['blue']); > > > > > > > echo "\">\$</font>"; > > > > > > > } > > > > > > > echo "<br>\n"; > > > > > > > } > > > > > > > ?> > > > > > > > </body></html> > > > > > > > > > > > > > > - James "ReDucTor" Mitchell > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > > For additional commands, e-mail: php-general-help@lists.php.net To > > > > > contact the list administrators, e-mail: > > > > > php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > > For additional commands, e-mail: php-general-help@lists.php.net To > > > > > contact the list administrators, e-mail: > > > > > php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-general-help@lists.php.net To > > > > contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net To > > > contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#69275) next »