root/trunk/robots/test.php

Revision 1, 469 bytes (checked in by anonymous, 7 years ago)

initial import

Line 
1#!/usr/bin/php
2<?
3
4include('../includes/removeaccents.inc.php');
5
6function label2name($label)
7{
8        $name = strtolower(removeaccents($label));
9    $name = preg_replace("/[^a-z0-9\.]/","-", $name);
10    $name = preg_replace("/^[\-|\.]*/","", $name);
11    $name = preg_replace("/[\-|\.]*$/","", $name);
12        $name = stripslashes($name);
13        $name = preg_replace("/[\-]{2,}/", "-", $name);
14        return trim($name);
15}
16
17echo label2name($argv[1]);
18
19print_r($GLOBALS);
20
21?>
Note: See TracBrowser for help on using the browser.