Collection of mostly command line tools / PHP scripts. Somewhat out of date.

⌈⌋ branch:  scripts + snippets


Check-in [428b5c30a3]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:wrapper to use PHP functions from commandline, needs function name symlinks onto it
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:428b5c30a36297ff50bca52230f6a6d80024d31a
User & Date: mario 2012-01-09 04:19:24
Context
2014-03-09
03:30
Uses curl_multi{} wrapper to fetch total social media backlinks to given URL check-in: f2846c5a3a user: mario tags: trunk
2012-01-09
04:19
wrapper to use PHP functions from commandline, needs function name symlinks onto it check-in: 428b5c30a3 user: mario tags: trunk
04:18
dialog based mass renaming check-in: 9db78a345e user: mario tags: trunk
Changes

Added php/PhpFunctionCall.



















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/php -qC
<?php

   #-- function name
   $func = $_SERVER["argv"][0];
   $func = substr($func, strrpos($func, "/") + 1);

   #-- args
   $args = $_SERVER["argv"];
   array_shift($args);

   #-- stdin as arg
   if (!count($args)) {
      if (($f = fopen("php://stdin", "rb"))
      and ($input = fread($f, 1<<22))) {
         array_unshift($args, $input);
         fclose($f);
      }
   }

   #-- do
   $output = call_user_func_array($func, $args);
   echo $output;

?>