Scriptin demosu burda var: Free Short Url Redirection | Zeak.Net
Sormak istediğim, bu yazılımda link tek bir satırdan çekilip sonrada onun kısa halini veriyor.
Benim yapmak istediğim ise çoklu yazı kısmından bir çok satırdan link çekip hepsini çevirdikten sonra hepsini kullanıcıya göstermesi.
Anlatım biraz karışık oldu sanırım.. Kısaca yapmak istediğim bir sefered alınan bağlantı sayısını arttırmak.
Free Short Url Redirection | Zeak.Net burdakini
Örnek olarak bu şekilde yapmak: RapidShare Protection Links
index.html
<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">
<input type="text" name="url" size="40" 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 href="http://www.zeak.net/" target=_blank>PHP ZLink</a> | Copyright © S.A - Zeak.Net</div>
</body>
</html>create.php<?
/************************************************************************
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.
************************************************************************/
include("config.php");
if (strstr($_SERVER['HTTP_REFERER'], $root));
else { header ("Location: $rooturl"); }
$ip = $_SERVER['REMOTE_ADDR'];
$url = $_POST['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';
}
?>