<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<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>
<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">
<textarea name="url" rows="50" cols="50"></textarea></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 href="http://www.zeak.net/" target=_blank>PHP ZLink</a> | Copyright © S.A - Zeak.Net</div>
</body>
</html> <?
include("config.php");
if (strstr($_SERVER['HTTP_REFERER'], $root));
else { header ("Location: $rooturl"); }
$ip = $_SERVER['REMOTE_ADDR'];
$urlto = split('\n',$_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;
require 'create_template.php';
} else {
echo 'Your URL is invalid';
}
}
?>