Ice Ardor

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromIce Ardor
ToMe
SubjectUsing validateEmail.php in Pascal Program
Date19 January 2006 03:23
I found the validateEmail.php a while back and have found it useful to
manually test a couple spams to see if they are from a legitimate email
address. However, I'd like to harness the full power of this script by
embedding automated queries within an anti-spam program that I am writing
for my science fair project. (I do have my own server with php support, so I
won't be killing your bandwidth)

 For my science fair project, I am comparing different methods of spam
recognition and figured that this script would work decently with my
program. However, I am in no way literate with PHP, nor am I really sure
that since all of the email validation is done server-side that it would be
possible to use this script in my program. It simply wouldn't be
translatable. I am writing in Pascal (Borland Delphi) for my project and was
wondering how I would go about writing this script so that it could contact
the necessary servers.

 Validating email addresses is one of the methods in my science fair
project, and I was hoping that it'd prove to be an accurate way of
determining if incoming mail is spam or not. They say most spam is
computer-generated and the sender email address isn't real. Excellent
script, and I'd love to integrate it into my program.

 I need to know if there's a way that this PHP script can be converted into
Pascal, and if the communication with servers would likely work. Thanks in
advance.

 Warmly,
 IceArdor
FromMe
ToIce Ardor
SubjectRe: Using validateEmail.php in Pascal Program
Date25 January 2006 09:40
> I am writing in Pascal (Borland Delphi) for
> my project and was wondering how I would go about writing this script
> so that it could contact the necessary servers.

well, it has been a long time since I programmed in Pascal, and I certainly
never got to the stage of working with sockets, so as far as writing in
Pascal is concerned, I am basically a lost cause.

Assuming Pascal/Delphi can work with sockets (which it seems to be able to),
it should be possible to translate, but you will need someone who knows both
languages.

But before we give up, it should be fairly simple to use without
translating. Install PHP on the computer, and run it from the command line -
you can use its return value to work out if it was successful. That should
not be too hard, since it's basically how CGI works.

Would this solution be acceptable?

>  They say most spam is
> computer-generated and the sender email address isn't real.

In my experience, anout half of my spam is random gibberish, the other half
is real addresses of other victims. I have occasionally been unlucky enough
to have them fake my address as the sender - at which point I get 1000s of
bounce replies from people saying they were on holiday :\


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromIce Ardor
ToMe
SubjectRe: Using validateEmail.php in Pascal Program
Date29 January 2006 09:11
Pertaining to your emailtools.php validateEmail script.

> > I am writing in Pascal (Borland Delphi) for
> > my project and was wondering how I would go about writing this script
> > so that it could contact the necessary servers.

Well, I think I figured out another way to use your handy email validator
within my program, without translating it into Pascal. In order for your
script to work, a POST command must be passed through in order to evaluate
an email address. However, I've spent a while and still can't quite figure
out the POST command. Is there a way that I can pass an email address
through without using the POST command, like in the URL as a parameter?

[URL]/emailtools.php?email=%s

If the script could support this in-URL parameter, it'd make my life a lot
easier. If the script doesn't currently support in-URL parameters, can you
tell me how I may modify your script to allow that?

Thanks.
FromMe
ToIce Ardor
SubjectRe: Using validateEmail.php in Pascal Program
Date29 January 2006 19:29
All you need to do is to run the function, passing it the email address as
a parameter. In PHP, parameters are obtained using the $_GET array. For
example, if you run it as:
validateEmail.php?blah=foo@bar.com
you can then do this:
print checkEmail( $_GET['blah'] );

That will print the return value.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.