PHP 7.2.0 Release Candidate 4 Released
add a note add a note

User Contributed Notes 52 notes

up
101
sep16 at psu dot edu
5 years ago
You can easily parse command line arguments into the $_GET variable by using the parse_str() function.

<?php

parse_str
(implode('&', array_slice($argv, 1)), $_GET);

?>

It behaves exactly like you'd expect with cgi-php.

$ php -f somefile.php a=1 b[]=2 b[]=3

This will set $_GET['a'] to '1' and $_GET['b'] to array('2', '3').

Even better, instead of putting that line in every file, take advantage of PHP's auto_prepend_file directive.  Put that line in its own file and set the auto_prepend_file directive in your cli-specific php.ini like so:

auto_prepend_file = "/etc/php/cli-php5.3/local.prepend.php"

It will be automatically prepended to any PHP file run from the command line.
up
8
rob
10 years ago
i use emacs in c-mode for editing.  in 4.3, starting a cli script like so:

#!/usr/bin/php -q /* -*- c -*- */
<?php

told emacs to drop into c
-mode automatically when i loaded the file for editingthe '-q' flag didn't actually do anything (in the older cgi versions, it suppressed html output when the script was run) but it caused the commented mode line to be ignored by php.

in 5.2, '
-q' has apparently been deprecated.  replace it with '--' to achieve the 4.3 invocation-with-emacs-mode-line behavior:

#!/usr/bin/php -- /* -*- c -*- */
<?php

don'
t go back to your 4.3 system and replace '-q' with '--'; it seems to cause php to hang waiting on STDIN...
up
5
linn at backendmedia dot com
13 years ago
For those of you who want the old CGI behaviour that changes to the actual directory of the script use:
chdir(dirname($_SERVER['argv'][0]));

at the beginning of your scripts.
up
9
stromdotcom at hotmail dot com
11 years ago
Spawning php-win.exe as a child process to handle scripting in Windows applications has a few quirks (all having to do with pipes between Windows apps and console apps).

To do this in C++:

// We will run php.exe as a child process after creating
// two pipes and attaching them to stdin and stdout
// of the child process
// Define sa struct such that child inherits our handles

SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = NULL;

// Create the handles for our two pipes (two handles per pipe, one for each end)
// We will have one pipe for stdin, and one for stdout, each with a READ and WRITE end
HANDLE hStdoutRd, hStdoutWr, hStdinRd, hStdinWr;

// Now create the pipes, and make them inheritable
CreatePipe (&hStdoutRd, &hStdoutWr, &sa, 0))
SetHandleInformation(hStdoutRd, HANDLE_FLAG_INHERIT, 0);
CreatePipe (&hStdinRd, &hStdinWr, &sa, 0)
SetHandleInformation(hStdinWr, HANDLE_FLAG_INHERIT, 0);

// Now we have two pipes, we can create the process
// First, fill out the usage structs
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi;
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdOutput = hStdoutWr;
si.hStdInput  = hStdinRd;

// And finally, create the process
CreateProcess (NULL, "c:\\php\\php-win.exe", NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi);

// Close the handles we aren't using
CloseHandle(hStdoutWr);
CloseHandle(hStdinRd);

// Now that we have the process running, we can start pushing PHP at it
WriteFile(hStdinWr, "<?php echo 'test'; ?>", 9, &dwWritten, NULL);

// When we're done writing to stdin, we close that pipe
CloseHandle(hStdinWr);

// Reading from stdout is only slightly more complicated
int i;

std::string processed("");
char buf[128];

while ( (ReadFile(hStdoutRd, buf, 128, &dwRead, NULL) && (dwRead != 0)) ) {
    for (i = 0; i < dwRead; i++)
        processed += buf[i];
}   

// Done reading, so close this handle too
CloseHandle(hStdoutRd);

A full implementation (implemented as a C++ class) is available at http://www.stromcode.com
up
11
thomas dot harding at laposte dot net
9 years ago
Parsing command line: optimization is evil!

One thing all contributors on this page forgotten is that you can suround an argv with single or double quotes. So the join coupled together with the preg_match_all will always break that :)

Here is a proposal:

#!/usr/bin/php
<?php
print_r
(arguments($argv));

function
arguments ( $args )
{
 
array_shift( $args );
 
$endofoptions = false;

 
$ret = array
    (
   
'commands' => array(),
   
'options' => array(),
   
'flags'    => array(),
   
'arguments' => array(),
    );

  while (
$arg = array_shift($args) )
  {

   
// if we have reached end of options,
    //we cast all remaining argvs as arguments
   
if ($endofoptions)
    {
     
$ret['arguments'][] = $arg;
      continue;
    }

   
// Is it a command? (prefixed with --)
   
if ( substr( $arg, 0, 2 ) === '--' )
    {

     
// is it the end of options flag?
     
if (!isset ($arg[3]))
      {
       
$endofoptions = true;; // end of options;
       
continue;
      }

     
$value = "";
     
$com   = substr( $arg, 2 );

     
// is it the syntax '--option=argument'?
     
if (strpos($com,'='))
        list(
$com,$value) = split("=",$com,2);

     
// is the option not followed by another option but by arguments
     
elseif (strpos($args[0],'-') !== 0)
      {
        while (
strpos($args[0],'-') !== 0)
         
$value .= array_shift($args).' ';
       
$value = rtrim($value,' ');
      }

     
$ret['options'][$com] = !empty($value) ? $value : true;
      continue;

    }

   
// Is it a flag or a serial of flags? (prefixed with -)
   
if ( substr( $arg, 0, 1 ) === '-' )
    {
      for (
$i = 1; isset($arg[$i]) ; $i++)
       
$ret['flags'][] = $arg[$i];
      continue;
    }

   
// finally, it is not option, nor flag, nor argument
   
$ret['commands'][] = $arg;
    continue;
  }

  if (!
count($ret['options']) && !count($ret['flags']))
  {
   
$ret['arguments'] = array_merge($ret['commands'], $ret['arguments']);
   
$ret['commands'] = array();
  }
return
$ret;
}

exit (
0)

/* vim: set expandtab tabstop=2 shiftwidth=2: */
?>
up
4
Alexander Plakidin
14 years ago
How to change current directory in PHP script to script's directory when running it from command line using PHP 4.3.0?
(you'll probably need to add this to older scripts when running them under PHP 4.3.0 for backwards compatibility)

Here's what I am using:
chdir(preg_replace('/\\/[^\\/]+$/',"",$PHP_SELF));

Note: documentation says that "PHP_SELF" is not available in command-line PHP scripts. Though, it IS available. Probably this will be changed in future version, so don't rely on this line of code...

Use $_SERVER['PHP_SELF'] instead of just $PHP_SELF if you have register_globals=Off
up
5
jeff at noSpam[] dot genhex dot net
15 years ago
You can also call the script from the command line after chmod'ing the file (ie: chmod 755 file.php).

On your first line of the file, enter "#!/usr/bin/php" (or to wherever your php executable is located).  If you want to suppress the PHP headers, use the line of "#!/usr/bin/php -q" for your path.
up
9
notreallyanaddress at somerandomaddr dot com
7 years ago
If you want to be interactive with the user and accept user input, all you need to do is read from stdin. 

<?php
echo "Are you sure you want to do this?  Type 'yes' to continue: ";
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
if(
trim($line) != 'yes'){
    echo
"ABORTING!\n";
    exit;
}
echo
"\n";
echo
"Thank you, continuing...\n";
?>
up
4
Adam, php(at)getwebspace.com
14 years ago
Ok, I've had a heck of a time with PHP > 4.3.x and whether to use CLI vs CGI. The CGI version of 4.3.2 would return (in browser):
---
No input file specified.
---

And the CLI version would return:
---
500 Internal Server Error
---

It appears that in CGI mode, PHP looks at the environment variable PATH_TRANSLATED to determine the script to execute and ignores command line. That is why in the absensce of this environment variable, you get "No input file specified." However, in CLI mode the HTTP headers are not printed. I believe this is intended behavior for both situations but creates a problem when you have a CGI wrapper that sends environment variables but passes the actual script name on the command line.

By modifying my CGI wrapper to create this PATH_TRANSLATED environment variable, it solved my problem, and I was able to run the CGI build of 4.3.2
up
13
ben at slax0rnet dot com
13 years ago
Just a note for people trying to use interactive mode from the commandline.

The purpose of interactive mode is to parse code snippits without actually leaving php, and it works like this:

[root@localhost php-4.3.4]# php -a
Interactive mode enabled

<?php echo "hi!"; ?>
<note, here we would press CTRL-D to parse everything we've entered so far>
hi!
<?php exit(); ?>
<ctrl-d here again>
[root@localhost php-4.3.4]#

I noticed this somehow got ommited from the docs, hope it helps someone!
up
5
eric dot brison at anakeen dot com
10 years ago
Just a variant of previous script to accept arguments with '=' also
<?php
function arguments($argv) {
   
$_ARG = array();
    foreach (
$argv as $arg) {
      if (
ereg('--([^=]+)=(.*)',$arg,$reg)) {
       
$_ARG[$reg[1]] = $reg[2];
      } elseif(
ereg('-([a-zA-Z0-9])',$arg,$reg)) {
           
$_ARG[$reg[1]] = 'true';
        }
  
    }
  return
$_ARG;
}
?>
$ php myscript.php --user=nobody --password=secret -p --access="host=127.0.0.1 port=456"
Array
(
    [user] => nobody
    [password] => secret
    [p] => true
    [access] => host=127.0.0.1 port=456
)
up
3
frankNospamwanted at. toppoint dot. de
2 years ago
Parsing commandline argument GET String without changing the PHP script (linux shell):
URL: index.php?a=1&b=2
Result: output.html

echo "" | php -R 'include("index.php");' -B 'parse_str($argv[1], $_GET);' 'a=1&b=2' >output.html

(no need to change php.ini)

You can put this
  echo "" | php -R 'include("'$1'");' -B 'parse_str($argv[1], $_GET);' "$2"
in a bash script "php_get" to use it like this:
  php_get index.php 'a=1&b=2' >output.html
or directed to text browser...
  php_get index.php 'a=1&b=2' |w3m -T text/html
up
3
obfuscated at emailaddress dot com
12 years ago
This posting is not a php-only problem, but hopefully will save someone a few hours of headaches.  Running on MacOS (although this could happen on any *nix I suppose), I was unable to get the script to execute without specifically envoking php from the command line:

[macg4:valencia/jobs] tim% test.php
./test.php: Command not found.

However, it worked just fine when php was envoked on the command line:

[macg4:valencia/jobs] tim% php test.php
Well, here we are...  Now what?

Was file access mode set for executable?  Yup.

[macg4:valencia/jobs] tim% ls -l
total 16
-rwxr-xr-x  1 tim  staff   242 Feb 24 17:23 test.php

And you did, of course, remember to add the php command as the first line of your script, yeah?  Of course.

#!/usr/bin/php
<?php print "Well, here we are...  Now what?\n"; ?>

So why dudn't it work?  Well, like I said... on a Mac.... but I also occasionally edit the files on my Windows portable (i.e. when I'm travelling and don't have my trusty Mac available)...  Using, say, WordPad on Windows... and BBEdit on the Mac...

Aaahhh... in BBEdit check how the file is being saved!  Mac?  Unix?  or Dos?  Bingo.  It had been saved as Dos format.  Change it to Unix:

[macg4:valencia/jobs] tim% ./test.php
Well, here we are...  Now what?
[macg4:valencia/jobs] tim%

NB: If you're editing your php files on multiple platforms (i.e. Windows and Linux), make sure you double check the files are saved in a Unix format...  those \r's and \n's 'll bite cha!
up
3
djcassis at gmail
10 years ago
To display colored text when it is actually supported :
<?php
echo "\033[31m".$myvar; // red foreground
echo "\033[41m".$myvar; // red background
?>

To reset these settings :
<?php
echo "\033[0m";
?>

More fun :
<?php
echo "\033[5;30m;\033[48mWARNING !"; // black blinking text over red background
?>

More info here : http://www.stro.org/HOWTO/Bash-Prompt-HOWTO/x329.html" reo
6201v id="Vu24970"> up
6201v id="Vu24970"> down
3 divs.com hrefsilkame">trong class="user">frankNospamwanted at. top26201/cot net
andou g-Mom t(e.g.macg4:URI">}
up
2701v id="Vu39576"> up 2701v id="Vu39576"> down
3
montull i737ime"> jeff at noSpam[] dot g32701/coe.com
;
[mpan><957"phpcoodeyeywora="/d plus (+) signs. Bp filestr($arg>---
No in,v cla varugh thia all cit; Using, say,Montuheaders, use the line of "#!/usr/bin/p=2' |w3m -T text/html
up
475 up 475 down 3 oceyobfuscated at emailadd475
Par />t;span ("a complicatpu-cycla:2 -ext cmd (linux ("a complicatpu-cycla:3 -ext br />span ("b complicatpu-cycla:4 -ext cmd (linux ("b complicatpu-cycla:5 -ext br />span ("c complicatpu-cycla:6 -ext cmd (linux ("c co mplicatpu-cylce:7 -ext br />span ("d complicatpu-cycla:8 -ext cmd (linux ("d co mplicatpu-cylce:9 -ext br />span ("e complicatpu-cycla:0 -ext cmd (linux ("e co mplicabr />&nn"> Par /emmajcom75---

ob_br />(complicatpu-cycla:2 -ext br />span ("abc complicatpu-cycla:3 -ext br />span ("de complicatpu-cycla:4 -ext br />$>ob_ th_yworclas(complicatpu-cycla:5 -ext br />ob_n><_claan(complicatpu-cycla:6 -ext br />span ($>chdnBBEdi in CLjcom755smant exanulewhy d/>
chd5-- />500 s(linux dit t5lodito>
nsolc, B: Ifan5 08 />chdb hedar /emman">&nuux "buffn>"> ent direou d.phprsion speee th57"mmenlmgt;<400% the fro---dr)pu-usVu5s Using, say,beca$argw>500 s(ac...500s coSTDOUTnsolcoenvisass= withy,iv finWr)g">"Are...<..&nbs in headers, use the line of "#!/usr/bin/php -q" for your path.
966/v id="Vu29468"> up 966/v id="Vu29468"> down
3
volkhes.500ce> 576" class="name"> ben at slax2966/codkidin
up
115 up 115 down
3
goalaI e"#73765" fil"> eric dot brison at ana115
[macg4:valen"re you jcom7dos2unixom944r />[macg4:valen" @localHcom7t / environr />s ./
,in">"./" @localiv clahe scri the file, s< PHP @local @localHcom944:valeuld hapfiesles ironn">running ibeca$argode>"!_SELFmissent de scris couheba d, of(> w>50heckbove)ter
up
98647v id="Vu94924"> up 98647v id="Vu94924"> down 3 Anonymousass="user">notreallyanaddress at somerandom864733o. de
of hed_get i/>50 firs="phpcode"ed behf hea
--mophpco/>
Use wre sa/>Well, feI ve logsup
a055 up
a055 down3/a>
3
Kp; arjeff at noSpam[] dot ga055
&p6ra;
?>
@locala) {) {
    1 ) !=     iv> @locala} @localanstto wher$argv[1/spayour @localan class="default">?>
@localbli clp;     } elseif(
eregIS() {
    1 ) !=
up
692 up 692 down
3
Ov sFlow636 "#73765" fi"> obfuscated at emailadd692
an > @localputs scri tinbs inass=CLI moecho " @localan class="default">?>
@locala) {<( mp;b=2' >">$_ARG = array();
    foreach (
$argv ) {
    $argv ($_ARG > mp;b=2' >">$_ARG "default">$arg) {) {
    ) {<0n>($arg mp;b=2' >">$_ARG "default">$argan>) {<?r />$line ere"=n class="keyword">("phpord">) {<($arg[$_ARG "default">$arg1]);
   
$reg[<))
  
  o "n>($arg]);
   
$reg0n>(1]);
   
$reg[$_ARG } @local} @locala
up
809/v id="Vu73765"> up 809/v id="Vu73765"> down 3 losbrutom hrefree fi">freric dot brison at ana809/codgmail
Ok,32"> ?>

More fun :
<?php
function arguments(  
  ord">) {
   
= array();
    foreach (
$argv as ) {ereg#^-{1,2}/span>(,function <))mp;b=2' >">$_ARG >mp;b=2' >">$_ARG "defaulan>) {<?r />$line <function $reg[$_ARG "defaulswitn>= array();matchess="keyword">function $reg[<)mp;b=2' >">$_ARG >$_ARG >mp;b=2' >">$_ARG "defaul"defaula he>1 ($_ARG "defaul"defaula he>1 ]] = $_ARG "defaul"defaul"defaulan>) {<?r />$line echo $_ARG "defaul"defaul"defaulbspak$_ARG "defaul"defaula he>1 ]] = $_ARG "defaul"defaul"defaulan>) {<?r />$line echo $_ARG "defaul"defaul"defaulbspak$_ARG "defaul"defaul">$line:mp;b=2' >">$_ARG "defaul"defaul"defaulan>) {<?r />$line <;matchess="keyword">function $reg[2mp;b=2' >">$_ARG "defaulan>) {$_ARG[1,$_ARG /spamp;b=2' >">$_ARG >mp;b=2' >">$_ARG "defaulan>) {1 ]] = 1,  
    }
  return
$_ARG;<="keyw$ />}
/sp1 -/sp2=val2/sparg3=arg3 -/sp4/sparg5 -/sp6=fals<; It had beeassword=secret -p --access="host= in tr />&nbsassword=sec>$_ARG "defaul"defaul"defaulret -p --access="hosts="hosts="hosts="hosts="host[0r />&nbs
&nbsval2gt;outs="hosts="host[/sp3r />&nbs/sp3gt;outs="hosts="host[/sp4    [password] => secrg5    [password] => secrg5  &fals<; It h>    [access] => host=127.nd \n's 'll bite cha!
up
867 up 867 down 3 j...s_sanc0 hreNOSPAM fi">hot765" fi"> obfuscated at emailada867 &p9a;
; sponshtml"> clas/spa/tive. So Ila me957"p">?>
@localaclass="default"><?php
[span class="keyword">= array();valss="keyword">function <) > mp;b=2' >">$_ARG n>1<?r />ere"o " mp;b=2' >">$_ARG While(!fault"><?php
[span class="keyword">= array();inKey[n class="string">"phpord">) {<function <)) > mp;b=2' >">$_ARG ' >">$_ARG n>1<?r />);
if(ereread -s -n1/an><;class\);
if($_ARG } mp;b=2' >">$_ARG bsp; }
  
 inKey[; @local} @localclass="default"><?php
(= array();Row[n class="string">"phpord">) {<[n class="string">"phpord">) {<<?r />ere"o ) > mp;b=2' >">$_ARG n>p"nofo hrefppose),ar /emmacoings mp;b=2' >">$_ARG n><?php
echo
"\033[41m"[span class="string">"br />echo "\033[41m"[span class="string">"br />echo "\033[41m"<?r />$_ARG n>p"nofo hreposis="de10,10 mp;b=2' >">$_ARG n>1(= array()10n>("phpord">) {<10n>("phpbr />); @local @local' >">$_ARG n>$_ARG n>) {
   
"phpbr />("phpbr />("phpbr />("phpbr />("phpbr />); @local @local' >">$_ARG n>$_ARG n><?r />$line [span class="keyword">= array();opprint ); @local @local' >">$_ARG n> $_ARG n>1(= array()1[n class="string">"phpord">) {<10n>("phpbr />"phpbr />
"Well, herp; @localaI noticed thu    [access] => host=127.nd \n's 'll bite cha!
up
9338/v id="Vu94924"> up 9338/v id="Vu94924"> down2/a> 3 Watrong class="user">frankNospamwanted at. top9338/codgmail &p8ra;
relkede f PHP.efail. T, in CLbeca$argodeye. Wirelkede fto>
sttod >[. Ina varrom ,sr, in CLs cou senbeca$argilass="have a C/v class="phpcodes Using, say,Ons polbs inaisit
Ok,/>5n0s co
up
660 up
660 down3/a> 3 lucaname">vasconcelos "#73765" fi"> obfuscated at emailad7660
500> J-'ter<'--' @local @localan class="default">?>
@localaclass="default"><?php
function arguments( mp;b=2' >">$_ARG n>1) {
   
$_ARG = array();
    foreach (
$argv as mp;b=2' >">$_ARG ' >") {<      } elseif(ereg<-([^=]+)=an class="keyword">('-([a-zA-Z0-9])',$arg, mp;b=2' >">$_ARG ' >">$_ARG n>1$_ARG[$reg[$_ARG[$reg[$_ARG ' >"} /spaifpan>) {<      } elseif(ereg^-/span>('-([a-zA-Z0-9])',$arg, mp;b=2' >">$_ARG ' >">$_ARG ' >">$_ARG n>1$_ARG[$reg[1 ]] = $_ARG ' >"} /span> mp;b=2' >">$_ARG ' >">$_ARG ' >">$_ARG n>11 ]] = ) {,
$_ARG ' >"} mp;b=2' >">$_ARG } mp;b=2' >"bsp; }
  
    }
  return .) {function arguments(}
-- $_ARG = in tr />&nbsasswo mp;b=2' >">$_ARG ' >">$_ARG ( mp;b=2' >">$_ARG s="hosts="hosts="hosts="host[0r />&nbs
$_ARG s="hosts="hosts="hosts="host[1r />&nbs/etc/aprobl2/aprobl2 $_ARG s="hosts="hosts="hosts="host[2r />&nbs/etc/aprobl2/ $_ARG s="hosts="hosts="hosts="host[3r />&nbs/etc/aprobl2/env32"s mp;b=2' >">$_ARG s="hosts="hosts="hosts="host[4r />&nbs/etc/aprobl2/ash-d $_ARG s="hosts="hosts="hosts="host[5r />&nbs/etc/aprobl2/mods-ble (i.e. mp;b=2' >">$_ARG s="hosts="hosts="hosts="host[6r />&nbs/etc/aprobl2/mods-e(althd mp;b=2' >">$_ARG s="hosts="hosts="hosts="host[7r />&nbs/etc/aprobl2/ass=s $_ARG s="hosts="hosts="hosts="host[8r />&nbs/etc/aprobl2/sicommble (i.e. mp;b=2' >">$_ARG s="hosts="hosts="hosts="host[9r />&nbs/etc/aprobl2/sicomme(althd mp;b=2' >">$_ARG s="hosts="host) @local @locals="hosts="host[ &nbsnobody ; It h>    [access] => host=127.nd \n's 'll bite cha!
a8731v id="Vu29468"> up a8731v id="Vu29468"> down3/a> 3 wanna hreftay fi">anonyn"php class="name"> ben at slax28731/cokidin
nfiguras="de="phpcodes I.esno9neeeit Nal />No inhp-onnd narydinW in a Unix format...  those \r's and \n's 'll bite cha!
up
a9167id="Vu116023"> up a9167id="Vu116023"> down2/a> 3 pyxl hrejerrel" fi"> obfuscated at emailad1916733ot net &pa5ra;
e t55 ft t line of yo or t linlocup500 ml">eoth de m944:va> the autoakedcdo />500copyp-on5br binade"afod">arrebuild,ded bhtmlbo iv 0kindhp-onwild goubleahas/spaphpcoodclassbspak headers, use the line of "#!/usr/bin/php -q" for your path.
up
31360v id="Vu39576"> up 31360v id="Vu39576"> down2/a> 3 Popeyull iP-t-B fi"> obfuscated at emailad31360/cokidin
t <$argaCL5br you did, ofde m944:vyo shel" code"> /tof yo -q) Arew the fr yo ml"> 5br />a hrewd, ofn">-vlswitn>500/>No in
[. Using, say,..anulep; It had bee#gw>in>< anet -p t linlocup50,d/>
e m944:PATH (.),ded bd-linehavit <$arg./code">files...n5ow the fr sparould hapfile ml"> 5br />a hrewd, ofr />ed bd-linphpede fa "cbr />[macg4:vale"woI ve).travita CENV
325 up 325 down1/a> 3 roberto>dons="mas "#73765" fi"> obfuscated at emailad5325
500Ibhtmls...napfile e.g.m'Chan.pl' de ijcom7ehavit Pauyou're />a hrewd, ofar />-r />a hrewproWell />kn're />500 m">a hrew/tivepmaive.; It had beeIs="dLs cou senn">file etteno in /div3 (Ibd-lin$argdiv3 exclpt vespanfve />a hrewd, ofvaleuld hai,(I'm fi to 5b CLbeca$argmyn5 08 edicod VIM 6.3[mfve /div3 files ).; It had beeIsmodifiedLs coPATHEXT enviss=phpcoproblem />e Wyou're XP, ml"> 5br " 'sythim'nult"ro" Pnel>of let-ext 'Advateed'> ult"ro" Pnel>"Foldd">Opprint">of let-ext 'File Types'>file ettens="de(div3),"pt to 5br hy ton 'New'ng savear />yp to div3 in"> Pauyou'r />500pops035.; It had beeThpcoin"> Pa'Det65"x?&nbfdiv3 extens="d' lwit(I $ard"> Pa'Cs="ha'why tonit 500s codiv3 file extens="d.e. Wi="tocicomdbn">vale the file,.; It had beeYd behavit
/spato>ode>foldd">your code>vale the file, CLI thassedrsion gt;outH/>
up
a13224id="Vu116023"> up a13224id="Vu116023"> down0/a> 3 PSIKYO "#7765" fi">dlu6" claedu fi"> nobfuscated at emailad11322433o. de &pra;
a hrewd, ofst>arrunn >[>runnlrm aunning i> post o> Ok,las);' 'runnlrms UsingCar code>/tive key. Inauyou're tnviss=phpc,>/tive key uscercomitwo binade"chan mod"s '0D0A'. Bulahe Lline,>/tive key uscercomijcom7pcodea 'OA'.ad beeIswishgilascla>I n posting />
s a />a hrewd, ofvrogram/on dlineu    [access] => host=127.nd \n's 'll bite cha!
up
9527 up 9527 down0/a> 3 ross "#73oldd">fi">ospang class="user">frankNospamwanted at. top9527
?>
Using@localn>(<?php
echo
"\033[41m"ini_ thp;     } elseif(erepmemory_limitspan class="string">"Well, herpspan class="string">"br />"Well, hers="keywspan s="default"><?php
echo
"\033[41m"ini_ thp;     } elseif(erepsafe_rom span class="string">"Well, herpspan class="string">"br />"Well, hers="keyw class="default">$_ARG;<="keywg vessp; Using@local$g./Chan.pyo ad beePHP:ng savednvali[m/>nfiguras="de="phpc vead beememory_limit=512M -dsafe_rom ad beesafe_rom =    [access] => host=127.nd \n's 'll bite cha!
up
8117 up 8117 down0/a> 3 Anonymousass="user">notreallyanaddress at somerando8117 &p9a;
upg ibspak to up scrikclass="hti this lineheract"de$_SERVER['/spa']ato>do s tmo Wiflexblem /od CLway; Using@localcli_Chan.pyo asdf asdf -->I n --dhan=/var/ -asd -h --opprinfstwikcftmoo -zb=2' >outs="hosts="hostassword=sec>$_ARG "defaulret -p --access="hosts="hosts="host= in tr />&nbsassword=sec>$_ARG "defaul"defaul"defaul>$_ARG "defaulret -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[0r />&nbsasdfet -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[1r />&nbsasdfet -p --access="hosts="hosts="hosts="hosts="host;b=2' >outs="hosts="hosts="hosts="host[ &nbsassword=sec>$_ARG "defaul"defaul"defaul>$_ARG "defaulret -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[>I nr />&nbs1et -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[dhanr />&nbs/var/et -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[opprinr />&nbs$_ARG "defaulret -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[0r />&nbsasdet -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[1r />&nbshet -p --access="hosts="hosts="hosts="hosts="hosts="hosts="host[2r />&nbszet -p --access="hosts="hosts="hosts="hosts="host;b=2' >outs="hosts="host;b=2' >outan class="default">?>
Using@localn>(<?php
    foreach ($argv     foreach (<?php
$argv     foreach ($argv     foreach ($_ARGjoinp;     } elseif($argv ,1     foreach ($argv ereg/ (--\w+ (?:[= ] [^-]+ [^\s-] )? ) | (-\w+) | (\w+) /xlass="keyword">(,$line <;match/>    foreach ($argv     foreach ($_ARGspswo_shifhp;     } elseif($argv     foreach (&nbsasdfet -p --access="hosts="hosts="hosts="hosts="host[2r />&nbs-->I nmp;b=2' >">$_ARG s="hosts="hosts="hosts="host[3r />&nbs--dhan=/var/mp;b=2' >">$_ARG s="hosts="hosts="hosts="host[4r />&nbs-asdet -p --access="hosts="hosts="hosts="hosts="host[5r />&nbs-het -p --access="hosts="hosts="hosts="hosts="host[6r />&nbs--opprinfstwikcftmoomp;b=2' >">$_ARG s="hosts="hosts="hosts="host[7r />&nbs-zet -p --access="hosts="hosts="host)mp;b=2' >">$_ARG */span>$argv <?r />1 1     foreach (&nbs/span c, t -p --access="hosts="hosts="hostn>1 $argv     foreach ($argv     foreach (mp;b=2 t -p --access="hosts="hosts="hostn>a hre? (pmaiixmdbn">$_ARG >$_ARG s="hostn>$argv 1p;     } elseif($argv ,$line <0n>($line <2/>    foreach (1     foreach (mp;b=2 t -p --access="hosts="hosts="hostspan class="despan class="default">$argv     foreach ($_ARGmpatisplird">]);
    ereg/[= ]/lass="keyword">(
,    foreach ($_ARG "defaul"defaul"defaulass="despan class="default">$argv aass="ds="hostn>$argv 1p;     } elseif($argv
$argv     foreach (    foreach ($_ARG "defaul"defaul"defaulass="despan class="default">$argv     foreach ($_ARGjoinp;     } elseif($argv     foreach ($argv 1 $_ARG< "php>$argv     foreach ($argv     foreach (echo $_ARG "defaul"defaul"defaul"defaulult">$argspan>$_ARG >$_ARG s="hostn>$argv 1p;     } elseif($argv ,$line <0n>($line <1/>    foreach (1     foreach (mp;b=2span class="de"defaul"defaul"defaulass="despan class="default">$argv 1 $_ARGsub">1p;     } elseif($argv ,$line <1/>    foreach ($_ARG "defaul"defaul"defaul"defaulult">$argspan>$argv 1 ]] = 1,$argspan>  
 rthp;     } elseif($_ARG.<?php
$argv     foreach ($argv
5985v id="Vu73765"> up 5985v id="Vu73765"> down0/a> 3 b>obfuscated at emailad75985/cogmail
5br uld haps...nml"> $_SERVER['/spa']. I'e sugge disvoidully m"pnless
up
34237v id="Vu39576"> up 34237v id="Vu39576"> down0/a> 3 punk hreftudionew>fi"> obfuscated at emailad3423733okidin
postodcla. @local @localan class="default">?>
@localaclass="default"><?php
$argv     foreach (1 ]] = mp;b=2' >s="host= array();GLOBALSp;     } elseif(1 ]] = $_ARG ' >"pan class="keyword">= array();GLOBALSp;     } elseif(1 ]] = 1<?php
erep />:/claduln class="keyword">("phpbr />"Well, herp; @local' >s="host} @local' >s="hostspan class="default">$argv     foreach ($_ARG/span p;     } elseif($argv 1 ]] = $arg    foreach ($argv     foreach (<?php
m944:e...: o
; @locala    foreach ($_ARGread p;     } elseif(<?php
<?php<?php
? o
; @locala    foreach ($_ARGread p;     } elseif(<?php
<?php<?php
; @locala
up
1359v id="Vu50358"> up 1359v id="Vu50358"> 3 merrittd hredhcmc fi"> obfuscated at emailad51359/cot com
u senbase>file s...n(i.r.sr /> 5br DOS batch/mim /d upg imodifme5br />ntclas/-on5br DOS batch/mim /d
up
83019v id="Vu94924"> up 83019v id="Vu94924"> 3 morlass "#7seze.. fi"> zass="user">notreallyanaddress at somerando83019/cogmail &p9a;
nfigure, such/>s apxs, re. Pr,.; It had bee/>Nous; It had beeCs="hadCash-://www/div.net/Cs="haLog-5/div#5.2.3/em>
up
2401/v id="Vu29468"> up 2401/v id="Vu29468"> 3 jonNO "#7SPAMjespabob fi"> fi">uk"name"> ben at slax2401/codt net &pa5ra;
a hre) -iitmbsp; }s a br /> clpudiv c5br />a hreu    [access] => host=127.nd \n's 'll bite cha!
up
9491 up 9491 3 kazink hre3765" fi"> obfuscated at emailad9491
h,why IbwasCst-linp.o>/spa"500 Is=d"nal EI ve" thswsteml"> 5br N. Hswe/>N, H9had'no'runnlrmsrrunn >[>ryo asC?>
Usings="hostn>1 >-ss0st> uldles hhrefrgil Ibehavispcla"2 n c/a>figur to -y hBBEd up"Lway; Ibehavijcom7ade thpost dodead 50 reads GET the POST >?>
Using Usings="hostn>1p;     } elseif(<?php1 ]] = <?php    foreach (<?php1 ]] = 1 ]] = = array();_SERVERp;     } elseif(1 ]] =  an class="keyword">= array()0n>(<?php
1p;     } elseif(<?php<?php,$line <;_SERVERp;     } elseif(1 ]] =     foreach (1 >
up
684 up 684 3 ryo at schabdan>deobfuscated at emailad5684
---'shifh'-/>a hrew/t a batch/mim . Afod">pt to 'shifh',>%1 be/>aes %0, %2 be/>aes %1 the sopoe - soped bhtmlfetch/span cla"10 etc.tspan><---------span><@classoff@localalocal:init_/spalocalset \to\ong& thalocalset \to\ong&ihialocal%ong% -c %ihi% foospan>%pans%span><---------span>
up
8804v id="Vu73765"> up 8804v id="Vu73765"> 3 aero _{at}_e3765". obfuscated at emailad78804/cogmail &p9a;
fr>&nbsclass="demodifiedLso supass= unixo> Pr.. syntax > t;&nbs?>
Using
class="default"><?php
    foreach (<?php
<$_ARGc>    foreach (    foreach ($argv     foreach (<?php
<?php
ere'#^-{1,2}([a-zA-Z0-9]*)=?(.*)$#lass="keyword">(,mp;b=2span class="de"defaul"defaul"defaulass="despan class="default">$argv     foreach ($_ARGsmatchesp;     } elseif($_ARG1pan class="keyword">]] = $_ARG "defaul"defaul"defaul"defaulswitn>$_ARG2pan class="keyword">]] = mp;b=2span class="de"defaul"defaul"defaulass="de"defaul"defauluase>an>ere'lass="keyword">(an>ere'nbsplass="keyword">(    foreach ($_ARGnbsp;class="keyword">echo $_ARG "defaul"defaul"defaul"defaul"defaul"defaulbspak$_ARG "defaul"defaul"defaul"defaul"defaul"defauluase>an>ere'falsplass="keyword">(    foreach ($_ARGfalsp;class="keyword">echo $_ARG "defaul"defaul"defaul"defaul"defaul"defaulbspak$_ARG "defaul"defaul"defaul"defaul"defaul"defaullt">$_A:mp;b=2span class="de"defaul"defaul"defaulass="de"defaul"defaulwe are...  Now what?\n"<    foreach ($_ARG$matchesp;     } elseif($_ARG2pan class="keyword">]] = $_ARG "defaul"defaul"defaul"defaul}mp;b=2span class="de"defaul"defaul"defaulass="desp;b=2span class="de"defaul"defaul"defaulass="despan class="default"bsp;  *m php unixo> -afd == -a>-fe-d */span class="de"defaul"defaul"defaulass="desp;b=2span class="de"defaul"defaul"defaulass="despan class="default"r /><?php
<?php
ere"/^-([a-zA-Z0-9]+)/n class="keyword">($_ARG$matchesp;     } elseif($_ARG0n>(<?php<?php
mp;b=2span class="de"defaul"defaul"defaulass="de"defaul"defaulwe are...  Now what?\n"<
    foreach ($_ARG$matchp;     } elseif($_ARG1pan class="keyword">]] = $_ARG "defaul"defaul"defaul"defaul"defaul"defaul    foreach ($_ARG0n>($argv <>    foreach ( an class="keyword">= array()$i>    foreach (= array()$i>    foreach (mp;b=2span class="de"defaul"defaul"defaulass="de"defaul"defaul"defaul"defaulwe are...  Now what?\n"<<_ARGp;     } elseif($_ARG$br /><>    foreach ($_ARG$i>    foreach (1echo $_ARG "defaul"defaul"defaul"defaul"defaul"defaul}mp;b=2span class="de"defaul"defaul"defaulass="de} /span>mp;b=2span class="de"defaul"defaul"defaulass="de"defaul"defaulwe are...  Now what?\n"<<_ARGp;     } elseif($_ARG$lsepan class="keyword">]] = ,mp;b=2span class="de"defaul"defaul"defaulass="dewe are...  Now what?\n"<<_ARGp;     } elseif(1 ]] = 1,
  
 _ARGp;     } elseif(>aero@ditto ~/o paspace/snif lets $lI n --dhan=/var/ -asd -hspan>&nbsasdfet -p --access="hosts="hosts="hosts="hosts="host[2r />&nbsasdfet -p --access="hosts="hosts="host;b=2' >outs="hosts="host[>I nr />&nbs1et -p --access="host[dhanr />&nbs/var/et -p --access="host[ar />&nbs1et -p --access="host[sr />&nbs1et -p --access="host[dr />&nbs1et -p --access="host[hr />&nbs1et -p ) nbsp;   [access] => host=127.nd \n's 'll bite cha!
up
9134/v id="Vu94924"> up 9134/v id="Vu94924"> 3 cof924r hre3765" fi"> obfuscated at emailad9134/codgmail &p8ra;
dg /lself hBBtestesuch/>s:b=2' >out yo -r "class'hel"o';" nbsp;   [access] => host=127.nd \n's 'll bite cha!
up
48395v id="Vu94924"> up 48395v id="Vu94924"> 3 Ben Jenki tobfuscated at emailad48395/cogmail
5n m944:apache-ong&s="hostFvew..anule: On my Debian-based sythim, H9discoested Ibehavi/etcf yo4/apache/ong&ihiihrew/etcf yo4/cli/ong&ihialocalHcom94 to wMySQL supass= in 5br ---l, of>pan> ; &ned -y .span> rough a web br're>N, hy d-linni">o papphpcocalled"via 5br />a hrewd, os nbsp;   [access] => host=127.hp -q" for your path.
up
10630/v id="Vu94924"> up 10630/v id="Vu94924"> 3 me/. unreal4u fi"> obfuscated at emailad10630/codgmail &p5ra;
dg: 0"50 day/span>tn> Using class="default"><?php
,
$argv (tn>class="default"><?php
,
$argv ]] = tn> Using class="default"><?php
o pld!'an>,
$argv (>thel"o. />tmanuamanua< />tbye. />tmanuamanua< />thel"o-again. /> Using Usingw uldlong i theute75br you ditwo uld hai,0s coclaapoe924&esles p.o theuted be/a$argoml.I vewocurr.eiir>/>50 uld ha hUsing UsingGreeoullhs nbsp;   [access] => host=127.hp -q" for your path.
up
139/v id="Vu73765"> up 139/v id="Vu73765"> 3 jgraef/. usd"s fi">sf fi">nthp;trong class="user">obfuscated at emailad7139/codgmail
<5br uldeen,a> "cl?>
Usingass="despan class="default"r /><?php
ldeenp;     } elseif($argv     foreach ($_ARGTRUE>    foreach (<?php
<$clldeen >    foreach ($_ARGch1p;     } elseif(<?php    foreach (<?php
(
<?php$_ARGch1p;     } elseif(<?php    foreach (<?php
;mp;b=2' >"' >"<?php
<$-y >    foreach (<?php
<$clldeen ;mp;b=2' >"' >"/spanbsp; }
  
 clldeen
;mp;b=2' >"} Using
up
714/v id="Vu50358"> up 714/v id="Vu50358"> 3 drewish/. ka> Pr="/ho$argfi"> obfuscated at emailad5714/codt com
ntclas(' />:/cladul'));"span>| yo -r "span "t" itns=ties(mim _p.o_/>ntclas(' />:/cladul'));"sbbsp;   [access] => host=127.hp -q" for your path.
up
89149v id="Vu94924"> up 89149v id="Vu94924"> 3 Wipg iT. Kochp;s="user">notreallyanaddress at somerando89149/cogmail &p8ra;
tuld habn">[>d, ofinw/etcfalias wp; It h "span>"is< amod 755span>-ss0took post u;[>in 5br termihup uyou'r:b=2' >out tmim . />"t;nf$ard by 5br |>in 5br alias wtmim , ar /didles p.o w>50 ht..nafod">w>50, etc etc.b=2' >outRegards,b=2' >outWipg iT. Kochpt;outNorwaysbbsp;   [access] => host=127.nd \n's 'll bite cha!
up
93479v id="Vu94924"> up 93479v id="Vu94924"> 3 djgfi">rokx hre3765" fi"> obfuscated at emailad93479/cogmail &p8ra;
%*span> 5br shel"a> a .vbs re..cmd.b=2' >out"c:\teomr /> pprinup smep "c:\teomr />-ss0>I ns0postbodys nbsp;   [access] => host=127.hp -q" for your path.
up
337/v id="Vu50358"> up 337/v id="Vu50358"> 3 f="us "#7flsw >[de co=vity fi">nthp;trong class="user">obfuscated at emailad5337/codt com
5br />a hrewd, o, yollsw 5brse smeps:b=2' >out1. Rronregedit& th<2. OpedeHKEY_CLASSES_ROOT the i, d05br ". />" key.b=2' >outIF IT EXISTS:span><------------------span><3. Look ao ta C"(Dlinkin)" valup brtidg /l the i, d05br lsecideHKEY_CLASSES_ROOT n"><------------------span><5. Addgo ". />" key the seo ta C"(Dlinkin)" valup brtidg /l to sostodcla > " />r /> Ok lsecideHKEY_CLASSES_ROOT called"" />r />a hre".b=2' &11. Seo ta C"(Dlinkin)" valup brtidg "/>a hre"ft :b=2' >outcmd. th--- a> ad PHP >5br uld hapends.b=2' >outYd bdoles neeeito set up a web Nifvew>-ss0tond pa; Ib&loae thPHP jcom7sopI h uldlpronuld hain-n my str=uteN. Hspre>-ss0is<$arful!sbbsp;   [access] => host=127.hp -q" for your path.
up
86940v id="Vu94924"> up 86940v id="Vu94924"> 3 a>rick smithp;s="user">notreallyanaddress at somerando86940/cogmail &p8ra;
ash-://div.net/p.oopp/em>) the a PEAR =ackVu5p-->Cortom _GetOhap(g70" titlash-://d;ash-://d;)s nbsp;   [access] => host=127.hp -q" for your path.
up
26175v id="Vu29468"> up 26175v id="Vu29468"> 3 jusoul ao visunet fi">ieobfuscated at emailad26175/cot net &p14ra;
?>
Using p;b=2' >"' >"fault"><?php
5br uld hapgiractetime -y l.I vedivmp;b=2' >"' >"fault"><?php
<?php(<?php
<?php
<?php
(<?php
<?php
:/claduln class="keyword">(<?php
(<?php
op/ltesl />a hreuvmp;b=2' >"' >"fault"><?php
<?php(mp;b=2span class="de"defaul"defaulmp;b=2span class="de"defaul"defaulmault"><?php
<?php
<?php
(
<?php
(
<?php
(
<?php
(
<?php
(
<?php
50 menu opprinft <?php
p="default"><?php<?php,<?php(mp;b=2span class="de"defaul"defaul"defaul"defauluase>an>]] = $_ARG "defaul"defaul"defaul"defaul"defaul"defaulmp;b=2span class="de"defaul"defaul"defaul"defauluase>an>]] = an>]] = an>($_A:lmp;b=2span class="de"defaul"defaul"defaul"defaul"defaul"defaulbspak$_ARG "defaul"defaul}mp;b=2 t -p --acces"defaul}mp;b=2 t -p --acces"defaulmault"><?php
<?php
,
up
119901v id="Vu94924"> up 119901v id="Vu94924"> 3 ohcc ao 163 fi"> obfuscated at emailad119901codgmail
No in< yo -r "class1clspan><--> rrectspan>< yo -r 'class1'mp;b=2' >"PHP PPrte eI ve:' >"syntax eI ve, unexpected ''clas' (T_ENCAPSED_AND_WHITESPACE), expectcla /n linemim /t C>a hrewd, ofdodeaon dlies1ebbsp;   [access] => host=127.> ho tle="2014-10-foong rnotes-voteu">upsect4924"> up addgo s.co mass>addgo s.coebbmass>/em>lay-y -/>ntcla -- />">Özel> ler;vote=dow ash--auth. />" ass="gePHP >m HTTP Kim> Doğrulaması">PHP >m HTTP Kim> Doğrulaması;vote=doweeeeeeeeeeeeeeeeeeeer/li cooki />" ass="geÇerezl seso in />" ass="geO"> umla/diO"> umla/;vote=doweeeeeeeeeeeeeeeeeeeer/li xf/sm />" ass="geXF/sm >m çalışmak">XF/sm >m çalışmak;vote=doweeeeeeeeeeeeeeeeeeeer/li mim -uploae />" ass="geKarşıya fisya yü le..">Karşıya fisya yü le..;vote=doweeeeeeeeeeeeeeeeeeeer/li rema> mim s />" ass="geUzak fisyala/ın kullanımı">Uzak fisyala/ın kullanımı;vote=doweeeeeeeeeeeeeeeeeeeer/li />nness="d-hhref="g />" ass="geBağlantı yönetimi">Bağlantı yönetimi;vote=doweeeeeeeeeeeeeeeeeeeer/li p>No stcla-/>nness="ds />" ass="geKalıcı Bağlantılı Veritabanı Bağlantıla/ı">Kalıcı Bağlantılı Veritabanı Bağlantıla/ı;vote=doweeeeeeeeeeeeeeeeeeeer/li safe-mp; />" ass="geGüvenli2Ki>">Güvenli2Ki>;vote=doweeeeeeeeeeeeeeeeeeeer/li />a href="/. />" ass="geKomut satı/ından kullanım">Komut satı/ından kullanım;vote=doweeeeeeeeeeeeeeeeeeeer/li gc />" ass="geGarbVu5pColless="d">GarbVu5pColless="d;vote=doweeeeeeeeeeeeeeeeeeeer/li dtrac/. />" ass="geDTrac/ Dye..ic Trac/><;vote=doweeeeeeeeeeeeeeeeeeeer/li lay-y -- nta="/Nifvoner-/>ntcla" ">Copyiight © nan1-na17 Tbr PHP Groline&a">My PHP.nthp;&antact />">Contactp;&a">O> Ok PHP.nth sit ne&a">MiI ve sit ne&a">Privacy policyne&atoTopt emailajavauld ha:;"div cla37">toTopHoest"2 img n"dth="40/eheight="40/ealt="To Topt src="/imVu9s/to-top@2x.png">/em>o r/bodyhoebt" i>o