My website has a mail form run by PHP, and I'm getting a lot of e-mails
sent through it that appear to contain my website's domain after the
'@', though I didn't send them. The e-mails contain no other content,
so I assume it's some kind of spam bot.
There must be a line of PHP that I can add that will basically say, "if
the e-mail address contains '@mydomainname.com', do not send."
I tried looking at php.net, but I can only find scripts that check if
the address is a valid one, which isn't good enough. I need to be able
to block a certain e-mail domain.
Thanks very much.
--ZenBug 6 2679
Zenbug said the following on 05/09/2005 19:45: My website has a mail form run by PHP, and I'm getting a lot of e-mails sent through it that appear to contain my website's domain after the '@', though I didn't send them. The e-mails contain no other content, so I assume it's some kind of spam bot.
There must be a line of PHP that I can add that will basically say, "if the e-mail address contains '@mydomainname.com', do not send."
Regular expressions? http://www.php.net/pcre
Or even a simple string search? http://www.php.net/strpos
--
Oli
In article <11**********************@z14g2000cwz.googlegroups .com>,
"Zenbug" <ze****@gmail.com> wrote: My website has a mail form run by PHP, and I'm getting a lot of e-mails sent through it that appear to contain my website's domain after the '@', though I didn't send them. The e-mails contain no other content, so I assume it's some kind of spam bot.
There must be a line of PHP that I can add that will basically say, "if the e-mail address contains '@mydomainname.com', do not send."
I tried looking at php.net, but I can only find scripts that check if the address is a valid one, which isn't good enough. I need to be able to block a certain e-mail domain.
<?
if (!strstr($_POST["email"], "baddomain.com")){
mail(...);
}
?>
--
Sandman[.net]
I would like to know what is causing this, as
it is happening to some of my site aswell.
Is there some new spambot out there?
Barry
Zenbug wrote: My website has a mail form run by PHP, and I'm getting a lot of e-mails sent through it that appear to contain my website's domain after the '@', though I didn't send them. The e-mails contain no other content, so I assume it's some kind of spam bot.
There must be a line of PHP that I can add that will basically say, "if the e-mail address contains '@mydomainname.com', do not send."
I tried looking at php.net, but I can only find scripts that check if the address is a valid one, which isn't good enough. I need to be able to block a certain e-mail domain.
Thanks very much. --ZenBug My website has a mail form run by PHP, and I'm getting a lot of e-mails sent through it that appear to contain my website's domain after the '@', though I didn't send them. The e-mails contain no other content, so I assume it's some kind of spam bot.
Just out of interest, can this form be submitted using a link? It may
be just a search engine bot clicking on everything to spider your site.
In that case, you can exclude the page with the form using robots.txt.
---
Steve
Thanks for the help, all.
Steve: In point of fact, yes, the code that sends the message is
contained in its own page, so if I load it up in a browser, a message
will be sent. I actually just added code that won't send the message
if the 'comments' field is left blank, so that should help if it's a
search engine spider.
Can you tell me how to use robots.txt though? That sounds like a good
idea anyway.
--ZenBug Can you tell me how to use robots.txt though? That sounds like a good idea anyway.
See <http://www.searchengineworld.com/robots/robots_tutorial.htm> and
<http://www.robotstxt.org/wc/robots.html> for details. Note that only
compliant robots would be excluded; spam harvesters and the like will
ignore the file.
---
Steve This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro capabilities, unfortunately. I'd like to know if it may
be possible to add a powerful macro system to Python, while
keeping its amazing syntax, and if it...
|
by: Dave Mausner |
last post by:
in general, how does css teach us to position blocks relative to one
specific block? how does one specify which block is the reference for the
position of others relative to it?
for example, position block A somewhere; then create blocks B thru Z which
intend to have specific positions relative to A--above, below, left, and
right.
i...
|
by: Sandman |
last post by:
I'm having some problem here...
I have a javascript I've downloaded that goes through all PNG files and enables
the transparency channel in them for IE5.5+ by converting them to SPAN layers
with the image as background.
This works great until I put one of these PNG files inside a display:none block
and later sets the block to...
|
by: Jm |
last post by:
Hi All
I recently got some help with code conversion that i used in vb6 to block a
specific tcp port. The code runs under a timer and is run on a very low tick
count (Meaning it happens constantly). Unfortunately the code appears to do
nothing ? This is the converted code
Public Structure MIB_TCPROW
Public dwState As Integer
Public...
|
by: txican |
last post by:
the HTML is:
----------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>foo</title>
<style type="text/css">
<!--
..b {
| |
by: George |
last post by:
Hi,
Once the execution enters the "finally" block, the execution could have
followed
1. normal/non-exception execution. (I guess everyone knows what I mean here.)
2. Exception was thrown, and handled.
3. Unhandled exception.
Is there a way to find out which of above three has happened while in
|
by: ksukhonosenko |
last post by:
This message was originally posted to comp.lang.c++.moderated
----------------------------------------------------------------------------------------------
Hi!
I face a problem in my production code. I could deduce this problem to
program shown below. It seems, that try-block in constructor doesnt
work as it should (compared to case...
|
by: David Golightly |
last post by:
I'm taking a stab at making CSS sparklines - see
http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1&topic=
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>...
|
by: Keith G Hicks |
last post by:
I have a client that I wrote an MS Access app for quite a few years ago
where they need to know the height in inches of a block of text for billing
their customers. The MS Access app opens Word in the background, makes some
settings (font, font size, margins, etc.) and gets the height. It's all
worked quite well for 3 or 4 years.
However,...
|
by: iu2 |
last post by:
Hi,
Playing with imitating lambdas and ruby blocks in Python, I came up
with a very simple construct, for example:
import compiler
def dotimes(i, code):
for i in range(i):
exec code
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |