usergeyv
Знаток
- Регистрация
- 5 Июл 2013
- Сообщения
- 152
- Реакции
- 25
- Автор темы
- #1
Я слабенький в этом дели,вот и решил спросить в умных людей,если туплю,прошу извинить,но попробую раскрыть суть проблемы:
Скачал я скрипт linkin anonymizer типа клон anonym.To ,по ссылке
Для просмотра ссылки Войдиили Зарегистрируйся переадресация происходит, а с закодированным в base64 типа Для просмотра ссылки Войди или Зарегистрируйся нет. Как сделать видной ссылку при ее обработке скриптом и переадресацию на правильный адрес. В скрипте всего 4 файла
index.php
anonymizerTool.js
anonymize.js
ну и для настройки
config.php
Скачал я скрипт linkin anonymizer типа клон anonym.To ,по ссылке
Для просмотра ссылки Войди
index.php
PHP:
<?PHP
include "config.php";
$s = $_SERVER['QUERY_STRING'];
if ($s==null) {echo "<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<meta name=\"description\" content=\"anonymize your links with $sitename\" />
<meta name=\"keywords\" content=\"anonymous,link,url,redirect,forum,board,script,domain,external,hompage\" />
<title>$sitename | link to other sites anonymously</title>
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />
<script type=\"text/javascript\" src=\"anonymizerTool.js\"></script>
</head>
<body>
<div id=\"page\">
<div id=\"header\"></div>
<div id=\"content\">
<div class=\"lang_content\">
<h1>anonymize your links with $sitename</h1>
<div align=\"center\" class=\"nav_symbols\">
<div style=\"width: 180px; float: left;\">
<a href=\"#singleLink\"><img src=\"images/link.gif\" alt=\" anonymize a single link\" title=\" anonymize a single link\" /></a><br />
<a href=\"#singleLink\">anonymize a single link</a>
</div>
<div style=\"width: 180px; float: left; margin-left: 20px;\">
<a href=\"#multiLink\"><img src=\"images/script.gif\" alt=\"Script to anonymize all the links on your homepage or board\" title=\"Script to anonymize all the links on your homepage or board\" /></a><br />
<a href=\"#multiLink\"> Script to anonymize all the links on your homepage or board</a>
</div>
<div style=\"width: 180px; float: left; margin-left: 20px;\">
<a href=\"#info\"><img src=\"images/why.gif\" alt=\"Why use $sitename?\" title=\"Why use $sitename?\" /></a><br />
<a href=\"#info\">Why use $sitename?</a>
</div>
</div>
<div class=\"clearer\"></div>
<br />
<h2 id=\"singleLink\">anonymize a single link</h2>
<p>In order to produce a single anonymous link, enter the URL you want to link to and then click on \"Generate URL\".</p>
<form name=\"theform\" onSubmit=\"return go();\" action=\"#\">
<fieldset>
<h3>Your URL:</h3>
<input class=\"anonym_input\" type=\"text\" maxlength=\"255\" name=\"nick\" value=\"http://\" />
<input class=\"anonym_FormSubmit\" type=\"button\" onClick=javascript:go() value=\"Generate URL\" /><br /><br />
<h3>This is the anonymous URL:</h3>
<textarea class=\"anonym_textarea\" name=\"thelink1\" wrap=\"soft\" cols=\"66\" rows=\"1\" style=\"height: 30px; overflow: auto;\"></textarea><br />
<br /><h3>This is the anonymous URL as an HTML link:</h3>
<textarea class=\"anonym_textarea_big\" name=\"thelink2\" wrap=\"soft\" cols=\"66\" rows=\"1\" style=\"height: 30px; overflow: auto;\"></textarea><br />
<br /><h3>This is the anonymous URL as a board link (works with any board software):</h3>
<textarea class=\"anonym_textarea_big\" name=\"thelink3\" wrap=\"soft\" cols=\"66\" rows=\"1\" style=\"height: 30px; overflow: auto;\"></textarea><br />
</fieldset>
</form>
<br /><br />
<h2 id=\"multiLink\">Script to anonymize all the links on your homepage or board</h2>
<p>If you want to anonymize all the external links on your board or homepage, we can generate a
script for you to deal with this automatically for all your pages. Enter the Sites for which
links shall not be redirected to anonym.to (e.g. your own) and click on \"Generate script\".</p>
<br />
<form name=\"displayResult\" onsubmit=\"return false;\" action=\"#\">
<fieldset class=\"embeddingData\">
<label for=\"embeddingCode\" accesskey=\"2\" style=\"padding-top: 4px; display: block;\">You only have to place the resulting code at the end of the body area (if possible, directly before the </body> tag) of your main template. (<a href=\"#anleitung\">detailed instructions</a>)</label>
<textarea class=\"anonym_textarea\" id=\"embeddingCode\" name=\"embeddingCode\"></textarea>
<input class=\"anonym_FormSubmit\" type=\"button\" name=\"markAll\" id=\"markAll\" value=\"select all\" onclick=\"document.displayResult.embeddingCode.select();\" />
</fieldset>
</form>
<br />
<form name=\"anonymizerForm\" onsubmit=\"generateCode('anonymizerForm', 'embeddingCode'); return false;\" action=\"#\">
<fieldset class=\"generationData\">
<label for=\"keywordsInput\" accesskey=\"1\" style=\"padding-top: 4px; display: block;\">Do not anonymize the following domains / keywords (comma separated: domain1.tld, domain2.tld, keyword1, ...):</label>
<input type=\"text\" id=\"keywordsInput\" name=\"keywords\" class=\"anonym_input\" /><br />
<input type=\"submit\" id=\"submitButton\" value=\"generate\" class=\"anonym_FormSubmit\" />
</fieldset>
</form>
<br /><br />
<script type=\"text/javascript\">
generateCode(\"anonymizerForm\", \"embeddingCode\");
</script>
<h2 id=\"info\">The advantages of anonymizing your external links with $sitename</h2>
<p>Webmasters can use this tool to prevent their site from appearing in the server logs of
referred pages as referrer. The operators of the referred pages cannot see where their
visitors come from any more.<br>
Using the referrer removal service is quite easy:<br>
<a href=\"http://$url/?http://www.dephy.org/\">http://$url/?http://www.dephy.org/</a>
produces an anonymous link to <a href=\"http://www.dephy.org/\">dephy.org</a> which prevents
the original site from appearing as a referrer in the logfiles of the referred page.</p>
<br /><br />
<h2 id=\"anleitung\">Detailed instructions for the anonymizing script</h2>
<p>Once the script is embedded in a website, it redirects all the links via $sitename
- except for the sites that were excluded when generating the script. In vBulletin, for
example, you can include the script code in the footer of the global templates
(Styles&Templates - Global templates - Footer). In Wordpress, use the footer.php.<br>
Since the script can only anonymize links that have already been loaded at runtime,
it's a good idea to place the code as close to the end as possible. Otherwise, links
that appear after the script code would not be redirected via $sitename.<br />
<br />
$sitename only disguises what page a visitor comes from.
<div class=\"clearer\"></div>
</div>
</div>
<div id=\"footer\">
<div id=\"footer_inside\">
<p>
Running Version 1.0 of <a href=\"http://sourceforge.net/projects/noreferplz/\">NoReferPLZ</a>, an <a href=\"http://anonym.to/\">Anonym.to</a> clone, by <a href=\"http://dephy.org/\">DEPHY</a>
</p>
<div class=\"sp16\"></div>
</div>
</div>
</div>
</body>
</html>"; }
else echo "
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
<meta http-equiv=\"refresh\" content=\"$wait; URL=$s\">
<title>$sitename - free dereferer service</title>
<style type=\"text/css\">
html {
background: #000;
}
body {
background: #404040;
border: 1px solid #666;
color: #999;
font: 14px \"Lucida Grande\", \"Lucida Sans Unicode\", tahoma, verdana, arial, sans-serif;
margin: 5% 10%;
text-align: center;
}
a {
color: #FF8301;
}
h1 {
color: #EEE;
}
#container {
background: #292929;
line-height: 2.4;
padding: 1em;
}
p#url {
font-weight: bold;
overflow: hidden;
width: 100%;
}
</style>
</head>
<body>
<h1>$sitename</h1>
<div id=\"container\">
<p>Please wait while you're being redirected to ...<br />
<p id=\"url\"><a href=\"$s\">$s</a></p>
<hr />
<p><a href=\"http://$url/\">$sitename</a></p>
</div>
</body>
</html>";
?>
anonymizerTool.js
PHP:
var PIMPLINK = "домен.ru"; //CHANGE THIS TO YOU WEBSITE
function go()
{
x = document.theform.nick.value;
if(x.length < 11)
{
return 0;
}
var displayURL = x.replace("http://", "");
y = document.location.search.substring(1,11);
y = "";
document.theform.thelink1.value = "http://"+PIMPLINK+"/?" + x + "" + y;
document.theform.thelink2.value = "<a href=\"http://"+PIMPLINK+"/?" + x + "" + y + "\">" + displayURL + "</a>";
document.theform.thelink3.value = "[url=http://"+PIMPLINK+"/?" + x + "" + y + "]" + displayURL + "[/url]";
return false;
}
function generateCode(formName, displayIn)
{
var script_path = "http://"+PIMPLINK+"/anonymize.js";
var keywords = document.forms[formName].elements["keywords"].value;
keywords = keywords.replace(" ", "");
var keywords_array = new Array();
var the_code = "";
keyword_array = keywords.split(",");
// check -> do some checks here, if wanted
// ...
// build the code
the_code += "<script src=\"" + script_path + "\" type=\"text/javascript\"></script>\n\n";
// debug only
//the_code += "<!-- display stats (if you don't want stats the_code, just kick this and the next line) -->\n";
//the_code += "<div>anonyminized by anonym.to: <span id=\"found_links\"></span> links found; <span id=\"anonyminized\"></span> anonyminized</div>\n\n";
the_code += "<script type=\"text/javascript\"><!--\n";
the_code += "protected_links = \"" + keyword_array.join(", ") + "\";\n\n";
the_code += "auto_anonymize();\n";
the_code += "//--></script>\n";
// spit it out
displayCode(displayIn, the_code);
}
function displayCode(displayIn, the_code)
{
var the_element = document.getElementById(displayIn);
the_element.value = "";
the_element.value = the_code;
}
anonymize.js
PHP:
var pimplink = "домен.ru"; //CHANGE THIS TO YOU WEBSITE
var protected_links = "";
var a_to_va = 0;
var a_to_vb = 0;
var a_to_vc = "";
function auto_anonymize()
{
auto_anonyminize();
}
function auto_anonyminize()
{
var a_to_vd = window.location.hostname;
if(protected_links != "" && !protected_links.match(a_to_vd))
{
protected_links += ", " + a_to_vd;
}
else if(protected_links == "")
{
protected_links = a_to_vd;
}
var a_to_ve = "";
var a_to_vf = new Array();
var a_to_vg = 0;
a_to_ve = document.getElementsByTagName("a");
a_to_va = a_to_ve.length;
a_to_vf = a_to_fa();
a_to_vg = a_to_vf.length;
var a_to_vh = false;
var j = 0;
var a_to_vi = "";
for(var i = 0; i < a_to_va; i++)
{
a_to_vh = false;
j = 0;
while(a_to_vh == false && j < a_to_vg)
{
a_to_vi = a_to_ve[i].href;
if(a_to_vi.match(a_to_vf[j]) || !a_to_vi || !a_to_vi.match("http://"))
{
a_to_vh = true;
}
j++;
}
if(a_to_vh == false)
{
a_to_ve[i].href = "http://"+pimplink+"?" + a_to_vi;
a_to_vb++;
a_to_vc += i + ":::" + a_to_ve[i].href + "\n" ;
}
}
var a_to_vj = document.getElementById("anonyminized");
var a_to_vk = document.getElementById("found_links");
if(a_to_vj)
{
a_to_vj.innerHTML += a_to_vb;
}
if(a_to_vk)
{
a_to_vk.innerHTML += a_to_va;
}
}
function a_to_fa()
{
var a_to_vf = new Array();
protected_links = protected_links.replace(" ", "");
a_to_vf = protected_links.split(",");
return a_to_vf;
}
ну и для настройки
config.php
Последнее редактирование модератором: