require("/srv/www/htdocs/web35/html/twiturl.inc.php"); include("/srv/www/htdocs/web35/html/result.php"); // Anlegen if($_REQUEST["new_url"]) { $tmp_url=$_REQUEST["new_url"]; $tmp_code=$_REQUEST["new_code"]; // neue regex, inklusive + und :. if(!preg_match("/^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-\+\~\:\[\];,_]+$/i",$tmp_url)) { $message="Bitte gib eine gültige URL ein!"; $show_url=$tmp_url; } if(eregi("twiturl.de",$tmp_url)) { $message="twiturl.de twiturlen? Das ist doch albern. ;)"; $show_url=$tmp_url; } // Wunschcode für RP ONLINE reservieren $tmp_rponline=substr($tmp_code,0,3); if($tmp_rponline=="rp-") { $message="Sorry, der Wunschcode ist reserviert."; $show_url=$tmp_url; } if(empty($message)) { $twiturl_status=twiturl_checkUrlIfExists($tmp_url); if($twiturl_status=="1") { $twiturl_code=twiturl_getCodeFromUrl($tmp_url); } if($twiturl_status=="2") { $twiturl_code=twiturl_createCodeForUrl($tmp_url,$tmp_code); } if($twiturl_code) { show_result($twiturl_code); exit; } if(!$twiturl_code) { $message="Deine Wunschadresse leider schon vergeben. Bitte versuch eine andere."; $show_url=$tmp_url; } } } ?>
twiturl ist ein Tool von Daniel Fiene und Malte Müller.