Server : Apache System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64 User : tradze ( 1001) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/tradze/public_html/vendor/jbroadway/urlify/scripts/ |
<?php
//
// Transliterate the provided argument or stdin if the argument was not present
//
require_once \dirname(__DIR__) . '/vendor/autoload.php';
require_once \dirname(__DIR__) . '/URLify.php';
// Print usage and exit if arguments are invalid
if ($argc < 1 || $argc > 2) {
die('Usage (argument): php ' . \basename(__FILE__) . " \"<text to transliterate>\"\nUsage (pipe): <Arbitrary command> | php " . \basename(__FILE__) . "\n");
}
// Process the provided argument
$piped = false;
if ($argc === 2) {
$s = $argv[1];
// Or read from stdin if the argument wasn't present
} else {
$piped = true;
$s = \file_get_contents('php://stdin');
}
echo URLify::transliterate($s) . ($piped ? "\n" : '');