Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-14-2003, 05:56 PM   #1
roly
Confirmed User
 
Join Date: Aug 2002
Posts: 1,844
simple help needed from php expert :)

hi

i'm getting plagued by spammers using spambots, including some cp spam that i just recieved, so i desperately need to prevent spambots. I'm no programmer but i've done a little script where i link to my script with for example:

http://mydomain.com/email.php?webmaster

i then have an email table in my database with email addresses corresponding to in this example webmaster. The script includes the following code:

Quote:
<?php
$result = mysql_query("select * from email WHERE emailcode LIKE '$QUERY_STRING'");
if ($result)
{
while ($row = mysql_fetch_array($result))
{
$contact = $row["emailadd"];
}
mysql_free_result($result);
header( "Location: mailto:$contact\n\n" );
}
?>
I know i'm probably using a sledgehammer to crack a nut but i need to do something.

my problem is that when you click that link above it opens an email ok, but also opens a blank white page. what i need to do is either get the blank white page to automatically click back to the page where the link was clicked, or alternatively if i use target="_blank" close the white webpage whilst leaving the origional page and email still open.

If anyone knows how to do that or an alternative method it would be appreciated although my description probably isn't to clear. I'm aware this will probably only stop spambots that crawl my page btw (at least i hope it will )

thanks in advance

Roly
roly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:11 PM   #2
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
So, you're not actually having a PHP problem.

Anyways, luckily for you I also know some hahahahahahahahahaha ... From what I read a simple onClick="hahahahahahahahahaha: return false;" should likely work? Not sure though....

Replace the hahahahahahahahahaha with "java script" without the space or quotes...

Cheers,
Matt

Last edited by Nysus; 04-14-2003 at 06:44 PM..
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:13 PM   #3
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
Btw, your PHP code format is messy... and your mySQL query string should use = and not LIKE ...

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:24 PM   #4
roly
Confirmed User
 
Join Date: Aug 2002
Posts: 1,844
Thanks Matt

I'm assuming that it was java script that is th banned word, i'll have a look around

Quote:
Originally posted by Nysus
Btw, your PHP code format is messy... and your mySQL query string should use = and not LIKE ...

Cheers,
Matt
I know, I'm surprised i got that far I'm a php newbie.

Thanks again
roly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:25 PM   #5
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
Quote:
Originally posted by roly
Thanks Nysus

I'm assuming that it was java script that is th banned word, i'll have a look around

I know, I'm surprised i got that far I'm a php newbie.

Thanks again
No problem! Why are you using mySQL for that anyways? You'd likely only be storing a few email addresses, no?

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:40 PM   #6
roly
Confirmed User
 
Join Date: Aug 2002
Posts: 1,844
Quote:
Originally posted by Nysus


No problem! Why are you using mySQL for that anyways? You'd likely only be storing a few email addresses, no?

Cheers,
Matt
no i was using a mysql database anyway for a searchable directory script i'm attempting to write and just added another table for emails
roly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:40 PM   #7
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
Quote:
<?
$email[1] = "[email protected]";
$email[2] = "[email protected]";
$email[3] = "[email protected]";

$contact = $email['$QUERY_STRING'];
Header ("Location: mailto: $contact");
?>
Above is likely all you'd need. Simply link to filename.ext?1 to send an email to the first in the array, etc.. Should work...

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:46 PM   #8
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
Quote:
Originally posted by roly


no i was using a mysql database anyway for a searchable directory script i'm attempting to write and just added another table for emails
Figured that...

Did the java script work ?

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 06:55 PM   #9
roly
Confirmed User
 
Join Date: Aug 2002
Posts: 1,844
Quote:
Originally posted by Nysus


Above is likely all you'd need. Simply link to filename.ext?1 to send an email to the first in the array, etc.. Should work...

Cheers,
Matt
cool! that's a bit simpler thanks, although that still leaves me with the problem of leaving a white page open when the page is clicked.

So i'll give the hahahahahahahahahaha a go

cheers

Roly
roly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 08:25 PM   #10
Jade
Confirmed User
 
Join Date: Jun 2001
Location: Houston, Texas
Posts: 329
Here is a link to a java script that will protect your email from webbots:

http://www.js-x.com/example/?ex=159&...&COLOR_OFF=YES

Tim
__________________

Cum see me at http://BlowjobJade.com

Last edited by Jade; 04-14-2003 at 09:10 PM..
Jade is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 08:27 PM   #11
Wizzo
2011 GFY Hall of Fame!
 
Wizzo's Avatar
 
Industry Role:
Join Date: Nov 2000
Location: Back in Texas!
Posts: 15,224
what they said...
__________________
Looking for Opportunity!
Wizzo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 08:30 PM   #12
roly
Confirmed User
 
Join Date: Aug 2002
Posts: 1,844
Quote:
Originally posted by Jade
The code didn't come out due to security enforcements by vbulletin. Contact me if you want the code.

Place the following java script where you want the email link to appear (remove the spaces from java script):

PHP Code:

                                                hahahahahahahaha type
="text/java    script">
<!--
    var 
first 'ma';
    var 
second 'il';
    var 
third 'to:';
    var 
address 'haha105;haha110;haha113;haha117;haha105;haha114;haha121;';
    var 
domain 'haha115;haha111;haha108;haha97;haha114;haha115;haha99;haha114;haha101;haha101;haha110;haha115;haha46;haha99;haha111;haha109;';
    
document.write('<a href="');
    
document.write(first+second+third);
    
document.write(address);
    
document.write('haha64;');
    
document.write(domain);
    
document.write('" title="[email protected]">');
    
document.write('[email protected]<\/a>');
// -->
</hahahahahahahaha 
Hope that helps.

Tim
Thanks Tim, I'll give it a try.

cheers

roly
roly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 08:47 PM   #13
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
An email crawler can see that email ... but... anyways..

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2003, 08:56 PM   #14
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
I was being lazy earlier too. You don't need to make a $contact variable .... Yah, I'm tired.

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2003, 08:07 AM   #15
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
This is a bit weird. Why would you even try using something like this against spambots?
A few real solutions:
Use hahahahahahahahahaha (see above)
Use a picture with your email address on it
Use a contact form on your website
Make a spambot trap
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2003, 10:17 AM   #16
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
Quote:
Originally posted by punkworld
This is a bit weird. Why would you even try using something like this against spambots?
A few real solutions:
Use hahahahahahahahahaha (see above)
Use a picture with your email address on it
Use a contact form on your website
Make a spambot trap
Yes, I agree with all of those above being different solutions, though I was trying to just help him out with his question. It's good to learn, ya know?

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.