1 (edited by MattF 2007-09-14 22:18)

Topic: @ Quaker: Contact form with captcha

For the life of me, I can't remember which thread you were asking about the contact form in. big_smile The link below has a contact form with captcha included:

http://outgoing.bauchan.org/unix/contact_form.txt

You need to download Mediators Image Verification mod:

http://www.punres.org/files.php?pid=59

and copy the three files ran.php, ran.class.php and anticlimax.gdf into your root forum folder. Put the contact form in there, and you should be good to go. The form also requires that all fields are non-empty, and the e-mail address has to be entered twice and match.

Edit: Remember to change the extension back to .php from .txt.

Re: @ Quaker: Contact form with captcha

Mattf, i got one from some where that ask a question and you have to give it a answer...
I just now seen this..lmao...


thanks..

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: @ Quaker: Contact form with captcha

mattf i like the contact.php u gave me...  there is a extra </div> at the end that needs to be taken off.. it threw the footer out of wack...

right be fore the </form> there is a </div> take that out..


also IM looking for a staff for a freelancer site that im building up
http://punlancer.com
http://punlancer.com/forum

interested?


hit me up!

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

4

Re: @ Quaker: Contact form with captcha

quaker wrote:

right be fore the </form> there is a </div> take that out..

Cheers for mentioning it. I'd forgotten to update the file on that link. big_smile Have updated it now.

Re: @ Quaker: Contact form with captcha

thanks...

any way posible to add the spam haus mod to it?

/***************************
   START SPAM PROTECTION
***************************/

// Address of the blocklist server
$checkspam['blocklist'] = 'sbl.spamhaus.org';

// Build the url to check (reverse DNS query). If you want to test if it works on
// your server, replace the "get_remote_address()" part with the following: '127.0.0.2'
$checkspam['Reverse DNS'] = implode( '.', array_reverse( explode( '.', get_remote_address() ) ) ) . '.' . $checkspam['blocklist'];

// Do the actual lookup. If the users IP is listed in the blocklist, we will be given just an IP back from the queried server.
// If the user is *not* listed as a spammer, the result we get back from the server will be the same string as we sent.
if( $checkspam['Reverse DNS'] != gethostbyname($checkspam['Reverse DNS']) ) {
    
    message('Unfortunately, it would appear that your current IP address is listed in one of the anti-spam databases we queried.
            Because of this, you will not be able to register a new account at this point in time. If you believe this to
            be a mistake, we urge you to read the FAQ over at <a href="http://www.spamhaus.org/faq/index.lasso">The Spamhaus Project</a>
            for more details, including actions you can take to resolve this issue.',true);
}

/****************************
   END OF SPAM PROTECTION
****************************/

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

6

Re: @ Quaker: Contact form with captcha

No probs. Leave it with me and I'll get that added when I've chance. smile

Re: @ Quaker: Contact form with captcha

that will stop the spammer from attacking ur contact forum if they find away around the entering double email addy and the captcha.


things we do to stop spammers...

lmao.

u get my email? about lancer site?

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

8

Re: @ Quaker: Contact form with captcha

quaker wrote:

u get my email? about lancer site?

Sent you a reply. smile

Here you go:

http://outgoing.bauchan.org/unix/contactcr.txt

Rename it to contact.php, drop it in the root forum dir, and set this var near the top of the file to one to enable the rbl check: $checkrbl = '0';

This script is totally untested, but should work. smile You do know that if someone can't register due to a rbl check in register.php, they'll have no means of contacting you now? big_smile

9

Re: @ Quaker: Contact form with captcha

Just as an update, have updated that file above as there was a tag missing from this line:

<b>The following information has been submitted to the forum admin:</b>

The trailing </b> had been omitted. Sorted now. smile

10

Re: @ Quaker: Contact form with captcha

mattf once i get home, ill look at that line and see what u took out.. just the

</b>
can u tell me what line number or part of the code pasted?

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

11

Re: @ Quaker: Contact form with captcha

I've just updated the script slightly again. I'd forgotten to call pun_htmlspecialchars on the info printed to screen. New download link:

http://forums.bauchan.org/unix/viewdownloads.php?dcid=1

12

Re: @ Quaker: Contact form with captcha

how do i turn on the img code ?
i downloaded ur new script and i dont see it in my contact pae.
http://punlancer.com/contact.php


thanks
Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

13

Re: @ Quaker: Contact form with captcha

never mind i read the top... change o to 1
lol..

i need to bundle this script with the img system and my register.php file....
we now got it where when people register they can select the certain groups..
members
webmasters
freelancers

since all three file work together..

thanks again......
Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

14

Re: @ Quaker: Contact form with captcha

quaker wrote:

never mind i read the top... change o to 1
lol..

big_smile big_smile

Thought it would make life easier adding the info in the file itself. big_smile

15

Re: @ Quaker: Contact form with captcha

thanks.. you did a great job...
have you seen my member selection in my register.php?

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

16

Re: @ Quaker: Contact form with captcha

quaker wrote:

have you seen my member selection in my register.php?

I saw mention of it over on Punlancer. smile Not had chance to have a peek at it yet though.

17

Re: @ Quaker: Contact form with captcha

that kewl. fsx got it working and smarty fixed some issue.
so now user have to pick a group..

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

18

Re: @ Quaker: Contact form with captcha

Mattf can u help me validate the register.php

im working on the new PunL version now.

when i try to valdate the register.php on localhost i get these errors.
i tried to treat the <img src="ran.php as a image and add the alt='' />

   1.   Error  Line 101, Column 33: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

                              <img src=ran.php alt="" /><br />

 2. Error Line 101, Column 33: XML Parsing Error: AttValue: " or ' expected.

                              <img src=ran.php alt="" /><br />

3. Error Line 101, Column 33: XML Parsing Error: attributes construct error.

                              <img src=ran.php alt="" /><br />

 4. Error Line 101, Column 33: XML Parsing Error: Couldn't find end of Start Tag img line 101.

                              <img src=ran.php alt="" /><br />
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

19

Re: @ Quaker: Contact form with captcha

You have no quotes around ran.php. It needs to be:

<img src="ran.php" alt="Captcha image" /><br />

Btw, I've just added the alt description for the accessibility side of things. If you're running it through an XML parser, everything needs to be absolutely spot bollock. The slightest error or omission will be punished by the parser big style. big_smile

20

Re: @ Quaker: Contact form with captcha

thanks. i got it fixed about midnight last night. i just opened the contact.php u designed and copied the code since contact was vaild...

your email also fixed an issue that i had...

thanks..


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!