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
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();
?>