1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Dublin, Ireland
    Rep Power
    It's been a while but I hope you guys can be of assistance once more. I have a mail script (see below) which works with a Flash form. The script works absoloutly fine for me and most other people who install it. however others installers report that the script seems to loop and then return the 'no spamming message'. What could be causing this? It is successfully running on different platformsbrowsers so I can't see a pattern. Would it be cookies or something? I would really appreciate if someone could help me out with this. I'm a Flash person and just getting to grips with PHP and feel quite powerless.

    BTW. Feel free to d/l the FlashPHP source files for your own use. It really is quite nifty (when it works!) Thanks...

    My working version: http://www.stephenmoran.f2s.com
    Source: http://www.stephenmoran.f2s.com/php_mail.zip

    /****Here is the only two variables, that need to be defined.****/

    /*How many times at a stretch visitor can send mail using the script (2 times default)*/
    $opss = 50;

    /*And after what amount of time allow that visitor to send mail again (1 hour default)*/
    $ok = 3600;

    $php_header = "From: $name <$from>n".
    "X-Mailer: Polar Lights Studios/Flash-PHP3 script";
    $antispam = $HTTP_COOKIE_VARS["times"];
    $message_tosent=$message."nn send by $REMOTE_ADDR.";
    if ($antispam < $opss){
    setcookie("times",$antispam+1,gmdate(time()) +$ok);
    if (@Mail($to,
    echo "&info=Mail sent. Thank you. A confirmation email wil be sent. &";
    $confirm_to = $name . "<$from>";
    $confirm_header = "From: Customer Service<mail@yoursite.com>";
    $confirm_message = "Your message has been sent. nTo: $tonSubject: $subjectn";
    $confirm_subject = "Email Confirmation";
    echo "&info=Error. Please try later.&";
    echo "&info=Sorry. Spamming not allowed here.&";

  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Rep Power

    if ($antispam < $opss){
    setcookie("times",$antispam+1,gmdate(time()) +$ok);

    i think the above condition is giving problem.
    you have to check it out your cookie is setting properly
    or not.try something like this for checking wether the
    cookie is setting properly or not.

    echo "Yea,Cookie has been set properly";
    echo "No !!Cookie is not settingn";

    SR -
    www.jobxyz.com-IT Career Portal

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. problem in Uploading file of size more than 512k in php
    By ssomvanshi in forum PHP Development
    Replies: 3
    Last Post: February 7th, 2004, 05:32 AM
  2. PHP link opening problem
    By Real World in forum PHP Development
    Replies: 2
    Last Post: February 5th, 2004, 06:48 AM
  3. XML DOM and PHP Problem, not displaying wanted info
    By drazhargraig in forum PHP Development
    Replies: 2
    Last Post: February 3rd, 2004, 03:14 PM
  4. fread problem: doesn t compile php code
    By ghorghor2002 in forum PHP Development
    Replies: 2
    Last Post: February 3rd, 2004, 05:25 AM
  5. New to PHP - problem with tutorial
    By adam_j_c in forum PHP Development
    Replies: 3
    Last Post: February 1st, 2004, 09:31 AM

IMN logo majestic logo threadwatch logo seochat tools logo