PHP is more than just scripting for web i tell you >:o

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
DeFormat
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 34
Joined: Wed Apr 15, 2009 12:28 pm

PHP is more than just scripting for web i tell you >:o

Post by DeFormat »

Well, i need to get this off my back. For the longest time, every time i talk about php to anyone, they always believe you cant do anything more than script advanced web pages with it. While php was originally meant for this, its not what it only does. If you happen to have a web server running on your lan (aka your computer or a computer in your home), such as WampServer (which i use), you can do much much more with PHP.

With WampServer, you can create console programs in PHP inside the php framework, you simply create a batch file to open the php script and bam, you have a console program in PHP. Many of you are going to think of this as crap, not useful, and you cant do anything with it. Well once again, your wrong. Im sure many of you have heard of a website called Gaia Online, iv created & seen account crackers, market botters, auto PMers, auto posters, and account creators which isnt released and prob wont be released which auto activates. All of this and more with this method of PHP scripting.

Some people need to rethink php :P

(BTW, your probably all thinking i sit at home and stare at PHP all day, i dont. I stare at C++ and java also)

Finally got that off my back >.<


EDIT:: Quick Non Tested Example. (for wampserver)

batch file placed in C:\wamp\bin\php\php5.2.9-1\example

batch source:

Code: Select all

..\php example.php
pause
php file placed in C:\wamp\bin\php\php5.2.9-1\example

example.php

Code: Select all

<?php
class example
{
	public function Start()
	{
		fwrite(STDOUT, "Press enter to start....");
		$this->input();

		fwrite(STDOUT, "loop X times: ");
		$Amount=$this->input();

		for($x=0; $x < $Amount; $x++)
		{
			echo ($x+1) . " loops counted\n";
		}
	}

	public function input()
	{
		return str_replace(array("\n", "\r", "\r\n"), null, fgets(STDIN));
	}
}

$Example = new example();
$Example->Start();
?>
Last edited by DeFormat on Sat Feb 27, 2010 12:26 am, edited 1 time in total.
User avatar
Trask
ES Beta Backer
ES Beta Backer
Posts: 738
Joined: Wed Oct 29, 2008 8:17 pm
Current Project: Building a 2D Engine
Favorite Gaming Platforms: Sega Genesis and Xbox 360
Programming Language of Choice: C/C++
Location: Pittsburgh, PA
Contact:

Re: PHP is more than just scripting for web i tell you >:o

Post by Trask »

DeFormat wrote:\. Im sure many of you have heard of a website called Gaia Online, iv created account crackers, market botters, auto PMers, auto posters, and my latest and greatest for gaia in a long time my new account creator which isnt released and prob wont release which auto activates, ill post a video probably.
I'm sorry, I couldn't get past this statement... you sound like an ass. Why would anyone, not set out to piss people off, create such things? I don't claim to know you/Gaia Online/or whatever else you rambled on about. If I'm outta line here, I'm sorry... but that bugs me that you're gloating about such things.
MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Dear god, they actually ported ES to a piece of celery!
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
User avatar
wtetzner
Chaos Rift Regular
Chaos Rift Regular
Posts: 159
Joined: Wed Feb 18, 2009 6:43 pm
Current Project: waterbear, GBA game + editor
Favorite Gaming Platforms: Game Boy Advance
Programming Language of Choice: OCaml
Location: TX
Contact:

Re: PHP is more than just scripting for web i tell you >:o

Post by wtetzner »

DeFormat wrote:With WampServer, you can create console programs in PHP inside the php framework...
Dude, just because you can do something doesn't mean you should. I've never even considered PHP to be a good web language.
The novice realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.
DeFormat
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 34
Joined: Wed Apr 15, 2009 12:28 pm

Re: PHP is more than just scripting for web i tell you >:o

Post by DeFormat »

Trask wrote:
DeFormat wrote:\. Im sure many of you have heard of a website called Gaia Online, iv created account crackers, market botters, auto PMers, auto posters, and my latest and greatest for gaia in a long time my new account creator which isnt released and prob wont release which auto activates, ill post a video probably.
I'm sorry, I couldn't get past this statement... you sound like an ass. Why would anyone, not set out to piss people off, create such things? I don't claim to know you/Gaia Online/or whatever else you rambled on about. If I'm outta line here, I'm sorry... but that bugs me that you're gloating about such things.
Sorry dont mean to gloat. And i know its cruel, but its just an avatar site.

Just posted those things to get my point across with php.
DeFormat
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 34
Joined: Wed Apr 15, 2009 12:28 pm

Re: PHP is more than just scripting for web i tell you >:o

Post by DeFormat »

wtetzner wrote:
DeFormat wrote:With WampServer, you can create console programs in PHP inside the php framework...
Dude, just because you can do something doesn't mean you should. I've never even considered PHP to be a good web language.
So be the fact just because you can do something doesnt mean you should, doing this is more powerful than you think. And there is no wrong doing with it.
CC Ricers
Chaos Rift Regular
Chaos Rift Regular
Posts: 120
Joined: Sat Jan 24, 2009 1:36 am
Location: Chicago, IL

Re: PHP is more than just scripting for web i tell you >:o

Post by CC Ricers »

Well, of course if you have any open source PHP stack and know your way around a shell, you can run scripts this way. I most commonly implement this with cron jobs.

Though when I think of extending PHP beyond web server use, I think more of bindings like PHP-GTK, which does enable you to make full blown GUI applications.
DeFormat
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 34
Joined: Wed Apr 15, 2009 12:28 pm

Re: PHP is more than just scripting for web i tell you >:o

Post by DeFormat »

Honestly, i dont bother going any farther than cmd prompt programs with php. If i want a gui on it ill do C++ or java.
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: PHP is more than just scripting for web i tell you >:o

Post by ibly31 »

Dude, you post here expecting to get love from every one about how you can ruin games and just be an overall jerk. I use PHP, and I have never once thought of doing something like that. Seriously, use your powers for good, not evil.
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
jacob.krustchinsky
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 34
Joined: Tue Feb 23, 2010 10:18 pm

Re: PHP is more than just scripting for web i tell you >:o

Post by jacob.krustchinsky »

I think I am just going to remain quiet as this is a pointless thread.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: PHP is more than just scripting for web i tell you >:o

Post by Falco Girgis »

PHP is a web scripting language. It was invented to be a web-based scripting language (an easy one too, because Perl and CGI had previously ruled that domain). It is primarily used as a web-based scripting language.

As somebody said, just because you can do something with a language that it wasn't mean to doesn't mean it should be done. You can do anything with C++, but why would I want to write something with it that a high-level scripting language could do much faster and easier?
User avatar
ismetteren
Chaos Rift Junior
Chaos Rift Junior
Posts: 276
Joined: Mon Jul 21, 2008 4:13 pm

Re: PHP is more than just scripting for web i tell you >:o

Post by ismetteren »

You can also write webpages with C++, but that dosent mean its a good idea.
Image ImageImage Image
DeFormat
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 34
Joined: Wed Apr 15, 2009 12:28 pm

Re: PHP is more than just scripting for web i tell you >:o

Post by DeFormat »

jacob.krustchinsky wrote:I think I am just going to remain quiet as this is a pointless thread.
Then why did you post? You just contradicted yourself.

Think before you post
User avatar
Trask
ES Beta Backer
ES Beta Backer
Posts: 738
Joined: Wed Oct 29, 2008 8:17 pm
Current Project: Building a 2D Engine
Favorite Gaming Platforms: Sega Genesis and Xbox 360
Programming Language of Choice: C/C++
Location: Pittsburgh, PA
Contact:

Re: PHP is more than just scripting for web i tell you >:o

Post by Trask »

DeFormat wrote:
jacob.krustchinsky wrote:I think I am just going to remain quiet as this is a pointless thread.
Then why did you post? You just contradicted yourself.

Think before you post
If this isn't the pot calling the kettle black.
MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Dear god, they actually ported ES to a piece of celery!
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
User avatar
JaxDragon
Chaos Rift Junior
Chaos Rift Junior
Posts: 395
Joined: Mon Aug 04, 2008 2:03 pm
Current Project: Kanoba Engine
Favorite Gaming Platforms: PS3, PC
Programming Language of Choice: C++
Location: Northeast NC

Re: PHP is more than just scripting for web i tell you >:o

Post by JaxDragon »

DeFormat wrote:
jacob.krustchinsky wrote:I think I am just going to remain quiet as this is a pointless thread.
Then why did you post? You just contradicted yourself.

Think before you post
I think he was speaking metaphorically. "remain quiet" as in leave most of his opinion to himself, seeing as "this is a pointless thread", and he didn't think such a topic was worth a response, but he felt you should know he thought this was "a pointless thread".
User avatar
TheBuzzSaw
Chaos Rift Junior
Chaos Rift Junior
Posts: 310
Joined: Wed Dec 02, 2009 3:55 pm
Current Project: Paroxysm
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: PHP is more than just scripting for web i tell you >:o

Post by TheBuzzSaw »

You are going to write some kind of local app and are too much of a sissy to learn C++, use Python. PHP is probably the worst choice (especially considering that you recommended installing a local web server to use it).
Post Reply