Jump to content


STHELT

Member Since 19/12/2005
Offline Last Active 10/03/2010, 19:28
-----

Topics I've Started

Get Url

23/02/2010, 23:23

estou fazendo um sistema para redirecionar paginas;
eu digito a url: http://teste.com/lin...w.google.com.br
dentro da pasta link(index.php) fika o link get: <a href="<?php $URL=$_GET["url"]; ?>">continue</a>
más o link fica igual a url: http://teste.com/lin...w.google.com.br
como eu faço para o link ficar apenas http://www.google.com.br ?

Protetor De Link

22/02/2010, 19:25

eu achei um script protetor de link mas quando eu uso algum link com "&" ele corta o link no meio...
o script:

link.js

function cuc(){var linkuc=document.getElementsByTagName("A");try{var locuc=(""+top.location.href).replace("http://","").replace("https://","").replace("www.","");}catch(e){var locuc=(""+document.location.href).replace("http://","").replace("https://","").replace("www.","");}for(i=0;i<linkuc.length;i++){domain_urluc=(""+linkuc[i].href).replace(/^\s+/g,"").replace(/\s+$/g,"").replace("http://","").replace("https://","");if(duc(linkuc[i].href)&&(((" "+linkuc[i].href).indexOf(locuc)<=0||(" "+linkuc[i].href).indexOf("http")<=0)||(" "+linkuc[i].href).lastIndexOf("http:")>3)&&(" "+linkuc[i].href).indexOf("script:")<=0&&(" "+linkuc[i].href).indexOf("#")!=1&&(" "+linkuc[i].href).indexOf("mailto:")<=0&&(" "+linkuc[i].href).indexOf("file:")<=0&&(" "+linkuc[i].href).indexOf("#exit")<=0&&!(!isNaN(parseInt(domain_urluc.substr(0,1)))&&(!isNaN(parseInt(domain_urluc.substr(0,2)))||domain_urluc.substr(0,2)=="."))){linkuc[i].target="_blank";linkuc[i].href=urluc+linkuc[i]+"";}}}function duc(urluc){if(""+domainuc!="undefined"&&domainuc!=""&&domainuc.replace(/\s/g,"")!=""&&urluc!=""){if((" "+domainuc).indexOf(",")>0){params_to_skip=domainuc.split(",");}else{params_to_skip=new Array(domainuc);}for(s=0;s<params_to_skip.length;s++){if((" "+urluc.toLowerCase()).indexOf(params_to_skip[s].toLowerCase())>0){if(""+domainsuc!="undefined"&&domainsuc!=""&&domainsuc.replace(/\s/g,"")!=""&&urluc!=""){if((" "+domainsuc).indexOf(",")>0){params_to_skip=domainsuc.split(",");}else{params_to_skip=new Array(domainsuc);}for(s=0;s<params_to_skip.length;s++){if((" "+urluc.toLowerCase()).indexOf(params_to_skip[s].toLowerCase())>0){return false;break;};}return true;}else{return true;}};}return false;}else{return false;}}if(""+window.onload==""||""+window.onload=="null"){window.onload=cuc;}else{var tout=window.setTimeout("cuc(); clearTimeout(tout)",1000);};



protetor.js

var urluc='http://MINHAURL.com/link/?url='+"";
var domainsuc='';
function cuc(){var linkuc=document.getElementsByTagName("A");try{var locuc=(""+top.location.href).replace("http://","").replace("https://","").replace("www.","");}catch(e){var locuc=(""+document.location.href).replace("http://","").replace("https://","").replace("www.","");}for(i=0;i<linkuc.length;i++){domain_urluc=(""+linkuc[i].href).replace(/^\s+/g,"").replace(/\s+$/g,"").replace("http://","").replace("https://","");if(duc(linkuc[i].href)&&(((" "+linkuc[i].href).indexOf(locuc)<=0||(" "+linkuc[i].href).indexOf("http")<=0)||(" "+linkuc[i].href).lastIndexOf("http:")>3)&&(" "+linkuc[i].href).indexOf("script:")<=0&&(" "+linkuc[i].href).indexOf("#")!=1&&(" "+linkuc[i].href).indexOf("mailto:")<=0&&(" "+linkuc[i].href).indexOf("file:")<=0&&(" "+linkuc[i].href).indexOf("#exit")<=0&&!(!isNaN(parseInt(domain_urluc.substr(0,1)))&&(!isNaN(parseInt(domain_urluc.substr(0,2)))||domain_urluc.substr(0,2)=="."))){linkuc[i].target="_blank";linkuc[i].href=urluc+linkuc[i]+"";}}}function duc(urluc){if(""+domainuc!="undefined"&&domainuc!=""&&domainuc.replace(/\s/g,"")!=""&&urluc!=""){if((" "+domainuc).indexOf(",")>0){params_to_skip=domainuc.split(",");}else{params_to_skip=new Array(domainuc);}for(s=0;s<params_to_skip.length;s++){if((" "+urluc.toLowerCase()).indexOf(params_to_skip[s].toLowerCase())>0){if(""+domainsuc!="undefined"&&domainsuc!=""&&domainsuc.replace(/\s/g,"")!=""&&urluc!=""){if((" "+domainsuc).indexOf(",")>0){params_to_skip=domainsuc.split(",");}else{params_to_skip=new Array(domainsuc);}for(s=0;s<params_to_skip.length;s++){if((" "+urluc.toLowerCase()).indexOf(params_to_skip[s].toLowerCase())>0){return false;break;};}return true;}else{return true;}};}return false;}else{return false;}}if(""+window.onload==""||""+window.onload=="null"){window.onload=cuc;}else{var tout=window.setTimeout("cuc(); clearTimeout(tout)",1000);};


na pagina do protetor, o link <a href="<?=$_GET['url']?>"><font face="Tahoma"><b>
Continuar &gt;&gt;&gt;</b></font></a>

A URL fica assim: http://MINHAURL.com/...rl=URLPROTEGIDA
quando uso assim:http://MINHAURL.com/link/?url=URLPROTEGIDA&alguma coisa&blblbl

o link fika http://MINHAURL.com/...rl=URLPROTEGIDA

Aparecer Texto Depois De Um Tempo

22/02/2010, 16:59

como faço para aparecer um texto ou uma div após x segundos?

Enviar Dados

13/08/2009, 02:21

como faço para modificar esse codigo de post/form para enviar um texto ja existente;

<?php require_once('file:///C|/www/Connections/booster.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
	case "text":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;	
	case "long":
	case "int":
	  $theValue = ($theValue != "") ? intval($theValue) : "NULL";
	  break;
	case "double":
	  $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
	  break;
	case "date":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "defined":
	  $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
	  break;
  }
  return $theValue;
}

$editFormAction = $HTTP_SERVER_VARS['PHP_SELF'];
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING'];
}

if ((isset($HTTP_POST_VARS["MM_insert"])) && ($HTTP_POST_VARS["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO playlist (nome, url) VALUES (%s, %s)",
					   GetSQLValueString($HTTP_POST_VARS['nome'], "text"),
					   GetSQLValueString($HTTP_POST_VARS['url'], "text"));

  mysql_select_db($database_booster, $booster);
  $Result1 = mysql_query($insertSQL, $booster) or die(mysql_error());
}
?>

<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
  <table align="center">
	<tr valign="baseline"> 
	  <td nowrap align="right">Nome:</td>
	  <td><input type="text" name="nome" value="" size="32"></td>
	</tr>
	<tr valign="baseline"> 
	  <td nowrap align="right">Url:</td>
	  <td><input type="text" name="url" value="" size="32"></td>
	</tr>
	<tr valign="baseline"> 
	  <td nowrap align="right">&nbsp;</td>
	  <td><input type="submit" value="Insert Record"></td>
	</tr>
  </table>
  <input type="hidden" name="MM_insert" value="form1">
</form>

em vez de enviar como form enviar um link ja existente na pagina....

EXEMPLO: NOME ------------------ <a href="www.link.com">LINK</a> ----X

NOME= enviar para o campo nome
www.link.com= enviar para o campo URL
X= ao clicar enviar informações

...

07/08/2009, 00:26

avaliem ai e deem sugestões...

IPB Skin By Virteq