<?
include("config.php");
if (strstr($_SERVER['HTTP_REFERER'], $root));
else { header ("Location: $rooturl"); }
$ip = $_SERVER['REMOTE_ADDR'];
$urlto = split(' ',trim($_POST['url']));
foreach($urlto as $key => $url){
if(preg_match('|^http(s)?://[a-z0-9-]+(\.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url))
{
$query = "INSERT INTO $table (ip,url) VALUES ('$ip','$url')" or die('MySQL error: '.mysql_error());
mysql_query($query);
$qs = mysql_insert_id();
$link = $destination . $qs;
$veri[] = $qs;
require 'create_template.php';
} else {
echo 'Your URL is invalid';
}
}
?><?
/************************************************************************
PHP ZLink Free Edition
Copyright(C), Zeak.Net, 2006.
PHP ZLink is protected by International copyright laws.
Unauthorized use or distribution of PHP ZLink is strictly prohibited,
To obtain a commercial license for using PHP ZLink, Or to remove the
links/branding of the script.
please go to PHP ZLink home page at http://www.zeak.net/
Author: S.A (http://www.zeak.net)
09/03 - 2006.
************************************************************************/
?>
<head>
<title>Free Short Url Redirection | Zeak.Net</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div class="header"><p><img src="img/logo.gif" alt="Help Im Stuck In This Image!" /></p></div>
<?
foreach($veri as $key => $value){
echo "<center>Your New Short ZLink: <a href=$rooturl" . $value. " target=_blank>$rooturl" . $value . "</a></center><br />";
}
?>
<div id="content">
<h1>Short Url Redirection | Make A Long Url Short.</h1>
<div class="spacer"><span></span></div>
<form method="post" action="create.php">
<p>
<label title="Enter Long Url Here | http:// To Make It Work">
<input type="text" name="url" size="60" value="http://" /></label><br />
<label title="Submit URL To Make A Tinyurl">
<input type="submit" name="send" value="Make It Short!" class="submit" /></label></p>
<div class="spacer"><span></span></div>
</form>
</div>
<div class="centered"><table>
<tr>
<td class="width"><div class="subcontent">
<ul>
<li><h2><strong>Redirection to any page.</strong></h2></li>
<li><h2><strong>Its easy to remember.</strong></h2></li>
</ul></div>
</td>
<td class="width"><div class="storycontent">
<ul>
<li><h2><strong>Friendly Link for SMS.</strong></h2></li>
<li><h2><strong>Just make it short.</strong></h2></li>
</ul></div>
</td>
</tr>
</table>
</div>
<!-- Read license.txt if you wish to remove the link -->
<div id="copy">Powered by <a rel="nofollow" href="http://www.zeak.net/" target=_blank>PHP ZLink</a> | Copyright © S.A - Zeak.Net</div>
<br /><div style="z-index:3" class="smallfont" align="center">LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.</div></body>
</html>