It is currently Fri Mar 29, 2024 9:10 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: I am having severe problems
PostPosted: Mon Nov 05, 2007 11:30 pm 
Newbie
Newbie

Joined: Mon Nov 05, 2007 11:17 pm
Posts: 7
I have opened several trouble tickets but can not find the answer. I am dizzy from Googling too. Basically, I have a referral page on my website. The user enters a friends email address into a form and I send an email with a referral link to the friend. What i want to do is have the email look like it is coming from the user. I know this is possible because I have found a similar website that does exactly what i am asking. I entered a email address from their site and my email, and the email my friend recieved had my email in the from header. How can I do this. I have tried everything.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 6:43 am 
Moderator
Moderator

Joined: Tue Feb 27, 2007 12:18 am
Posts: 521
This is possible but also more likaly to be reported as spam.

If you still want the code then ask and i will put some up.

_________________
http://www.mjmclocks.co.uk


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 11:18 am 
Newbie
Newbie

Joined: Mon Nov 05, 2007 11:17 pm
Posts: 7
Yes please. I am very grateful.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 4:40 pm 
Moderator
Moderator

Joined: Tue Feb 27, 2007 12:18 am
Posts: 521
would it be possible for me to look at the current page, so i can make it as easy as possible for you.

_________________
http://www.mjmclocks.co.uk


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 6:30 pm 
Newbie
Newbie

Joined: Mon Nov 05, 2007 11:17 pm
Posts: 7
Yes please do. The page is referral.php on my site. You are very kind. I have some other questiojns for you. I am very worried about people using my forms to spam. Is something like this ok to stop injection attacks.
Code:
eregi("to:",$field) || eregi("cc:",$field)


I have that code in my referral form.
My site is not complete yet, but I want to be prepared to fight the spammers.
I also have a contact form on my site. I want to limit the number of form submissions a day from a single ip, so a spammer just doesnt have a bot spam me all day. If you could help me with that code I would appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 7:22 pm 
Moderator
Moderator

Joined: Tue Feb 27, 2007 12:18 am
Posts: 521
can i have a link, i need to know what is currently on the page as in HTML so i can use the same names in the php part.

I personally wouldnt allow CC at all

Code:
if (preg_match('/cc:/', $feild)){
      die();
}

_________________
http://www.mjmclocks.co.uk


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 7:48 pm 
Newbie
Newbie

Joined: Mon Nov 05, 2007 11:17 pm
Posts: 7
sure it is [url]bobhar7.freehostia.com/referral.php
[/url] Do I need to worry abouyt a notes field or just headers?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 9:49 pm 
Newbie
Newbie

Joined: Mon Nov 05, 2007 11:17 pm
Posts: 7
Here is another problem I am having. I dont want any \n being entered into my headers, but this simple example does not work.
Code:
<?php
$test2 = stripslashes($test);
  if (eregi("(\n)", $test2)) {
     die("Why ?? :(");
   }
if (preg_match('/\n/', $test)){
      die();
}

?>
<html>
<form action="/test1.php" method="post"> <input type="text" name="test">
<input type="submit" name="submit">
</form>



</html>


Can someone please explain why this does not work?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 7:13 am 
Moderator
Moderator

Joined: Tue Feb 27, 2007 12:18 am
Posts: 521
try doing the stripslashes after the search for /n

_________________
http://www.mjmclocks.co.uk


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 7:44 am 
Newbie
Newbie

Joined: Mon Nov 05, 2007 11:17 pm
Posts: 7
It doesnt work with and without the strip slashes. Josh what happened to the code you were sending? Please buddy help me.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 8:04 am 
Newbie
Newbie

Joined: Mon Nov 05, 2007 11:17 pm
Posts: 7
A trouble ticket helped me with the /n problem. You have to use ' insted of "


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 7:24 pm 
Regular
Regular

Joined: Sun Apr 15, 2007 5:14 pm
Posts: 308
Location: Barrie On Ca
just a thought, but instead of it showing as coming from their email address, maybe you'd be better off with it adding the user's name to the subject line, like:

Subject: bob@nothing.com has invited you

that will make a big difference when it comes to isps like AOHell, who love to blacklist this kind of thing.
(they check the header info to see if the mail is coming from where it says it's coming from, which it wouldn't be, doing it your way)


i don't even know why i'm saying this, i absolutely HATE referral spam!
:)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Moderators: Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011