System of rotating banners with problems

New Here ,
Jan 23, 2016 Jan 23, 2016

Copy link to clipboard

Copied

I have a system of rotating banners with views of statistics and clicks, but I'm having trouble with Google IPS (66.249.xxx.xxx) being inserted into the views of the banners. How to fix it?

Thanks
Anderson

Views

169

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 23, 2016 Jan 23, 2016

Copy link to clipboard

Copied

Can you share the code for this issue?

--Dave

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 23, 2016 Jan 23, 2016

Copy link to clipboard

Copied

LATEST

I put a condition to "contains" before the query, and decided a little, instances of Google IPs decreased

Thanks


<CFSET Session.Pagina = "eventos">

<CFQUERY NAME="abreshopping" DATASOURCE="novosite_mysql">

SELECT id FROM publicidade WHERE secao = '#session.pagina#' and ativo = '1'

</CFQUERY>

<CFSET Lista="">

<CFLOOP QUERY="abreshopping">

<CFSET Lista=ListAppend(variables.lista, abreshopping.id)></CFLOOP>

<cfset totalitens = ListLen(variables.lista)>

<cfset item = RandRange(1, #variables.totalitens#)>

<cfset banner = ListGetAt(variables.lista, variables.item)>

<CFQUERY NAME="ShowShopping" DATASOURCE="novosite_mysql">

SELECT * FROM publicidade WHERE (id = #variables.banner#)

</CFQUERY>

<CFOUTPUT QUERY="ShowShopping">

  <CFQUERY NAME="voto" DATASOURCE="novosite_mysql">

  UPDATE publicidade SET n = #n#,

                             exibicao = exibicao+1

      WHERE n = #n#

  </CFQUERY>

  <CFIF '#cgi.REMOTE_ADDR#' CONTAINS '66.249'>

  <CFELSE>

  <CFQUERY NAME="abres" DATASOURCE="novosite_mysql">

  INSERT INTO cliques (n, exibicao, secao, referencia, titulo, cliques, data, hora, ip, codigo) VALUES ('#n#','1','#session.pagina#','#cgi.HTTP_Referer#','#T#','','#DateFormat(Now(), "dd/mm/yyyy")#','#TimeFormat(Now(), "HH:MM")#','#cgi.REMOTE_ADDR#','#RandRange(1000,4000)#')

  </CFQUERY>

  </CFIF>

</CFOUTPUT>

<cfoutput query="ShowShopping"><a href="contabanner.cfm?id=#n#&secao=#secao#&codigo=#Materia#" target="_new"><img src="banners/#banner#" border="0" alt="#anunciante#" title="#anunciante#"></a></cfoutput><br><br>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines