Ajuda como se faz o protetor de link para robôs estilo identi em php ?

  • Autor Autor bacanzito
  • Data de início Data de início
Tradução em andamento: em alguns minutos este tópico estará em português. Por enquanto, o conteúdo está no original em espanhol. Ver original
bacanzito

bacanzito

Eta
Usuário com poucas negociações! Use sempre o saldo do ForoBeta!
Ayuda ¿como se hace el protector de link para robots como este en php ?
ifM5h.gif


aqui la demo:

Inserir CODE, HTML ou PHP:
http://foro-vip.com/1.php

en un sitio solo me dieron esta respuesta que no comprendi muy bien

Esta hecho con jquery y jqueryui (el estilo del boton css). Te das cuenta por que agrega las librerias.

Inserir CODE, HTML ou PHP:
<link rel="stylesheet" type="text/css" href="http://foro-vip.com//css/jquery-ui.css?1341301048"/> /* Archivo CSS para JqueryUI - Le da estilo al boton y popup de errores dentro de la pagina */
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
/* Libreria Jquery */
<script type="text/javascript" src="http://foro-vip.com//js/jquery-ui-1.8.23.custom.min.js"></script>
/* Libreria JqueryUI */


Luego tenes..
Inserir CODE, HTML ou PHP:
<script type="text/javascript" src="http://foro-vip.com//js/aes.js"></script> /* Utilizado para cifrar, descifrar, generar keys, etc, creo que no es utilizado ? */
<script type="text/javascript" src="http://foro-vip.com//js/acciones2.js"></script> */* La mayoria son funciones para el foro vbulletin, pero al final encontramos lo que queremos. */


acciones2.js
[code=javascript]
var redirector_url = 'http://identi.li/u.php?u=';

function linkify(text) {
 * *if (text) {
 * * * *text = text.replace(/((https?\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi, function (url) {
 * * * * * *var full_url = url;
 * * * * * *if (!full_url.match('^https?:\/\/')) {
 * * * * * * * *full_url = 'http://' + full_url;
 * * * * * *}
 * * * * * *fullurl = $.trim(full_url);
 * * * * * *url = $.trim(url);
 * * * * * *return '<a target="_blank" rel="nofollow" href="' + redirector_url + full_url + '">' + url + '</a><br/>';
 * * * *});
 * *}
 * *return text;
}
var timerinterval = 0;
var t_spoiler = 10;
var frame_change = 0;
cdown = {
 * *spl: {},
 * *time: 5,
 * *load: function () {
 * * * *var obj = $('.contador');
 * * * *var txt = '';
 * * * *if (t_spoiler <= this.time && t_spoiler > 0) t_spoiler = t_spoiler - 1;
 * * * *if (t_spoiler == this.time) txt = 'Click en Publicidad';
 * * * *else if (t_spoiler == 0) txt = 'Click aqu&iacute; para continuar';
 * * * *else if (t_spoiler < this.time) txt = 'Espere ' + t_spoiler + ' seg. ';
 * * * *obj.html(txt);
 * * * *if (t_spoiler <= 0) {
 * * * * * *clearInterval(timer_interval);
 * * * * * *$('#my-dialog').dialog('close');
 * * * * * *_decrypt.open();
 * * * *}
 * *},
 * *frame: function () {
 * * * *frame_change++;
 * * * *t_spoiler = this.time
 * * * *cdown_start();
 * *}
}
cdown_start = function () {
 * *if (frame_change > 1) {
 * * * *frame_change = 0;
 * * * *timer_interval = setInterval("cdown.load()", 1000);
 * *}
}
var _open_ads = function () {
 * *var obj = $('#my-dialog');
 * *var frame = '<iframe onload="cdown.frame()" id="frame_publi" width="600" height="300" src="http://wwww.identi.li/popup.php"></iframe>';
 * *dialog_conf.width = 700;
 * *obj.dialog({
 * * * *title: 'Click en la publicidad &raquo; Esperar ' + cdown.time + ' seg'
 * *});
 * *obj.html(frame), obj.dialog(dialog_conf);
 * *obj.dialog("option", "buttons", [{
 * * * *text: 'Click en Publicidad',
 * * * *"class": 'ui-button-negative contador floatR'
 * *}]);
 * *obj.dialog("open");
 * *$('.ui-dialog-titlebar-close').remove();
 * *$('frame_publi').live(function () {
 * * * *$('a').attr('target', '_self');
 * *})
 * *$('.ui-dialog, #frame_publi,.ui-widget-overlay').bind("contextmenu", function (e) {
 * * * *return false;
 * *});
}
var _decrypt = {
 * *hash: {},
 * *objeto: {},
 * *links: function () {
 * * * *$('div #decrypt').click(function () {
 * * * * * *if (!$(this).hasClass('block')) {
 * * * * * * * *_decrypt.objeto = $(this);
 * * * * * * * *if (global.pauth != 1 && $.cookie('ads_accepted') == null) ventanaSecundaria();
 * * * * * * * *else _decrypt.open();
 * * * * * *}
 * * * *});
 * *},
 * *open: function () {
 * * * *var elem = this.objeto.parent().find('#hide'),
 * * * * * *content = elem.html();
 * * * *this.objeto.addClass('ui-button-positive');
 * * * *this.objeto.unbind();
 * * * *elem.html(content).slideDown();
 * *}
}
$(document).on('ready', function () {
 * *$('.post_body a, .comment-content a').attr('target', '_blank');
 * *_decrypt.links();
});

function getRandom(variablea, variableb) {
 * *return Math["floor"](Math["random"]() * (variableb - variablea + 1)) + variablea;
};
var pconfig = {
 * *time: getRandom(12, 16)
};
var t_spoiler = pconfig["time"];
var hija = null;
var timer = 0;
var publi_open = 0;
var publi_closed = 0;

function ventanaSecundaria() {
 * *$("div #decrypt")["addClass"]("block");
 * *t_spoiler = pconfig["time"];
 * *publi_closed = 0;
 * *publi_open = 0;
 * *hija = window["open"](global["boardurl"] + "/popup.php", "ventana1", "width=450,height=425,scrollbars=0,toolbar=no,directories=no,menubar=no,status=no,top=0,left=0");
 * *timer = window["setInterval"]("contador()", 1000);
};

function contador() {
 * *var variable14 = _decrypt["objeto"];
 * *if (hija != null && publi_closed == 0) {
 * * * *try {
 * * * * * *var variable15 = hija["closed"];
 * * * *} catch (err) {
 * * * * * *var variable15 = true;
 * * * *};
 * * * *if (hija["closed"]) {
 * * * * * *t_spoiler = pconfig["time"];
 * * * * * *mydialog["alert"]("Haz click en un anuncio y espera con la pagina abierta", "Atencion!");
 * * * * * *variable14["val"]("Ver Links De Descarga");
 * * * * * *_decrypt["objeto"]["bind"]();
 * * * * * *variable14["removeClass"]("ui-button-negative");
 * * * * * *$("div #decrypt")["removeClass"]("block");
 * * * * * *publi_closed = 1;
 * * * * * *hija = null;
 * * * * * *clearInterval(timer);
 * * * * * *return false;
 * * * *};
 * * * *var variable16 = window["location"]["host"];
 * * * *try {
 * * * * * *var variable17 = hija["location"]["host"];
 * * * * * *var variable18 = hija["frames"]["length"];
 * * * *} catch (err) {
 * * * * * *var variable17 = "";
 * * * * * *var variable18 = 0;
 * * * *};
 * * * *if (variable16 != variable17) {
 * * * * * *variable14["addClass"]("ui-button-negative");
 * * * * * *var variable19 = "";
 * * * * * *if (t_spoiler <= pconfig["time"] && t_spoiler > 0) {
 * * * * * * * *t_spoiler = t_spoiler - 1;
 * * * * * *};
 * * * * * *if (t_spoiler == pconfig["time"]) {
 * * * * * * * *variable19 = "Click en Publicidad";
 * * * * * *} else {
 * * * * * * * *if (t_spoiler == 0) {
 * * * * * * * * * *variable19 = "Ya puedes descargar!";
 * * * * * * * *} else {
 * * * * * * * * * *if (t_spoiler < pconfig["time"]) {
 * * * * * * * * * * * *variable19 = "No cerrar la publicidad, abriendo links en " + t_spoiler + " seg. ";
 * * * * * * * * * *};
 * * * * * * * *};
 * * * * * *};
 * * * * * *variable14["val"](variable19);
 * * * * * *if (t_spoiler <= 0) {
 * * * * * * * *t_spoiler = pconfig["time"];
 * * * * * * * *publi_open = 1;
 * * * * * * * *clearInterval(timer);
 * * * * * * * *_decrypt["open"]();
 * * * * * * * *$["cookie"]("ads_accepted", 1, {
 * * * * * * * * * *expires: 180
 * * * * * * * *});
 * * * * * * * *$("div #decrypt")["removeClass"]("block");
 * * * * * * * *variable14["removeClass"]("ui-button-negative");
 * * * * * *};
 * * * *};
 * *};
};


aparte de crear el popup y de establecer un temporizador tambien genera una cookie para establecer que se a aceptado la petición.
Es un poco mas elaborado, si recien estas viendo javascript te recomiendo empezar leyendo *sobre las funciones setInterval y window.open (son propias de javascript) y tratar de conbinarlas.

alguien me ayuda 🙄
 
Foi útil? Participe da conversa

Com sua conta grátis você pode responder, mandar mensagem privada ao autor e comprar com Saldo retido: o pagamento é liberado quando você recebe o combinado.

Leva 30 segundos · você volta a este tópico ao terminar
Yo lo tengo funcionando..
 
yo le vendi el spoiler al dueño de Enlace eliminado, por lo que vi le sacastes algunas partes jaja, pero igual te falta, dado que el javascript lo codifique.
 
yo le vendi el spoiler al dueño de Enlace eliminado, por lo que vi le sacastes algunas partes jaja, pero igual te falta, dado que el javascript lo codifique.

Lo tengo FUncionando perfectamente.. javascript es decodificable.. es necesario que los codigos se vean... Pero no lo uso.. mas adelante lo usare.. Pero me interesa mas el script..​
 
Voltar
Topo