Jump to content

unemployment

Members
  • Posts

    746
  • Joined

  • Last visited

Posts posted by unemployment

  1. I am using this for my blog url rewrite.

     

    RewriteRule ^blog/([0-9]+)/.*$ /blog.php?post_id=$1 [L]

     

    And that turns blog.php?post_id=3 into blog/3/title-seperated-by-dashes

     

    The problem is that even if I just type blog/3/hokdohkd  the link will still work!  I only want the link working if the title is correct too.

  2. I can't figure out how to write the a href part to make it blend in with the existing img syntax.  How do I alter this?

     

    <?php
    
    echo '<a href=\"{$r['feedusername']\"><img src="', getUserAvatar($r['feedusername']), "\" class=\"avatar mediumsmall newspadding f_left  mrl\" title=\"${r['associate_name']}\" alt=\"${r['associate_name']}\" /></a>";
    
    ?>
    

  3. I've altered my headers a bit. Here are the new ones.

     

    I'm not sure why my email is going to gmail spam.  I have been trying to fix this issue for about three days now.  I have a valid RDNS , MX and SPF record.  The full email headers are show below.  I'm not sure what I am missing.

     

    Delivered-To: jason@gmail.com

    Received: by 10.204.36.196 with SMTP id u4cs40852bkd;

            Tue, 30 Aug 2011 05:37:11 -0700 (PDT)

    Received: by 10.236.177.69 with SMTP id c45mr32611727yhm.97.1314707830686;

            Tue, 30 Aug 2011 05:37:10 -0700 (PDT)

    Return-Path: <contact@big.com>

    Received: from big.com (big.com [173.0.59.100])

            by mx.google.com with ESMTP id g2si5806973yhe.150.2011.08.30.05.37.09;

            Tue, 30 Aug 2011 05:37:09 -0700 (PDT)

    Received-SPF: pass (google.com: domain of contact@big.com designates 173.0.59.100 as permitted sender) client-ip=173.0.59.100;

    Authentication-Results: mx.google.com; spf=pass (google.com: domain of contact@big.com designates 173.0.59.100 as permitted sender) smtp.mail=contact@big.com

    Received: by big.com (Postfix, from userid 33)

      id DBDDD2F41159; Tue, 30 Aug 2011 08:37:00 -0400 (EDT)

    To: jason@gmail.com

    Subject: Closed Beta Invitation from Jason

    From: BIG <contact@big.com>

    Reply-To: BIG <contact@big.com>

    X-Mailer: PHP-5.3.8

    X-Sender: contact@big.com

    X-Priority: 3

    Organization: BIG

    MIME-Version: 1.0

    Content-Type: multipart/alternative; boundary=PHP-alt-e5123bae822ccd1b2897321b6db4fdc5

    Message-Id: <20110830123700.DBDDD2F41159@big.com>

    Date: Tue, 30 Aug 2011 08:37:00 -0400 (EDT)

    Modify message

     

  4. When I send an email via php to my gmail I have...

     

    Received: from newdomain.com (newdomain.com [173.0.59.100])

            by mx.google.com with ESMTP id j1si13689773yhn.96.2011.08.29.06.00.26;

            Mon, 29 Aug 2011 06:00:27 -0700 (PDT)

     

    Received: by olddomain.com (Postfix, from userid 33)

    id A04982F41212; Mon, 29 Aug 2011 09:00:18 -0400 (EDT)

     

     

    My received from is correct, but my received by shows my old domain I was using.  Happen to know how to change this in ubuntu's postfix?

  5. I have an email generated from PHP but it's getting placed in gmails spam folder.  Any idea how to get rid of my old domain from being displayed?  Is this something I do in php or in ubuntu command line?  If I have to change something in ubuntu, how do I edit the olddomainname.

     

    Here are the headers...

     

    Delivered-To: myname@gmail.com

    Received: by 10.204.7.18 with SMTP id b18cs39080bkb;

            Fri, 26 Aug 2011 10:18:41 -0700 (PDT)

    Received: by 10.90.21.11 with SMTP id 11mr1399661agu.42.1314379120253;

            Fri, 26 Aug 2011 10:18:40 -0700 (PDT)

    Return-Path: <www-data@mynewdomain.com>

    Received: from olddomain.com ([173.0.59.100])

            by mx.google.com with ESMTP id d18si2778913anm.121.2011.08.26.10.18.38;

            Fri, 26 Aug 2011 10:18:39 -0700 (PDT)

    Received-SPF: pass (google.com: domain of www-data@mynewdomain.com designates 173.0.59.100 as permitted sender) client-ip=173.0.59.100;

    Authentication-Results: mx.google.com; spf=pass (google.com: domain of www-data@mynewdomain.com designates 173.0.59.100 as permitted sender) smtp.mail=www-data@mynewdomain.com

    Received: by olddomain.com (Postfix, from userid 33)

    id 339452F41206; Fri, 26 Aug 2011 13:18:31 -0400 (EDT)

    To: myname@gmail.com

    Subject: Closed Beta Invitation from My Name

    From: mynewdomain <contact@mynewdomain.com>

    Reply-To: ***** <contact@*****.com>

    MIME-Version: 1.0

    Content-Type: text/html; charset=ISO-8859-1

    Message-Id: <20110826171831.339452F41206@*****.com>

    Date: Fri, 26 Aug 2011 13:18:31 -0400 (EDT)

  6. I now added in the reply to and the return path but my emails are still going to the spam folder in gmail and the email is still displayed as standard text in godaddy's mail service.  Any more suggestions?

     

    New headers...

    $headers  = "From: Site <contact@Site.com>\r\n";
    $headers .= "Reply-To: Site <contact@Site.com>\r\n"; 
    $headers .= "Return-Path: Site <contact@Site.com>\r\n"; 
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    

  7. You should only do inline styles using font with html emails and even those don't work on a lot of email clients.  One of the other phpf mods wrote this article that has some good info:  http://www.flingbits.com/article/view/developing-html-emails

     

    I don't think i'm sending the headers properly or something.  My godaddy mail is only output the text as code and gmail doesn't even receive the email at all.

     

    $headers  = "From: Mysite <noreply@mysite.com>\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    
    $body = 
    <<<BODY
    //stuff
    BODY;
    
    mail($mail, "Closed Beta Invitation from {$ref_info['displayName']}", str_replace(array('<[key]>', '<[ref_name]>', '<[ref_uname]>'), array($data[0]["key"],$ref_info['displayName'], $ref_info['username']), $body), str_replace('<[mail]>', $mail, $headers));

     

     

  8. I have created an email template for HTML emails, but something isn't quite right.  I use roundcube for my webmail and the email shows up perfect, but then in outlook it looks terrible.  Gmail wont even receive it and in godaddy's webmail it is displayed at text with the <table> code written out.  Any idea what I am missing?

     

    // To send HTML mail, the Content-type header must be set

    $headers  = 'MIME-Version: 1.0' . "\r\n";

    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

     

    // Additional headers

    $headers .= 'To: <[mail]>' . "\r\n";

    $headers .= 'From: cjkjckjxc <noreply@cojch.com>' . "\r\n";

     

    $body =

    <<<BODY

        //stuff goes here

    BODY;

  9. I am using this rewrite rule in my htaccess.    RewriteRule ^blog/([0-9]+)/.*$ /blog.php?post_id=$1 [L]

     

    For some reason when I go to create a sitemap via http://www.xml-sitemaps.com/

     

    It spiders pages that don't exist and keeps add pages to the url in the wrong way... for example...

     

    mysite.com/blog/5/blog-title    is a real url

    mysite.com/contact                  is a real url

    mysite.com/blog/5/blog-title/contact    is NOT a real url

     

    Is the rewriterule causing the issue?  I just want to make sure google's spiders don't have the same problem.

  10. You really should look into auto loading too instead of arbitrarily loading every library you have whether you need it or not.

     

    Hmm yeah... I wasn't including the init.php file.  It was a bit of a dumb mistake.  I thought it was already included in my index.php and that's why my header variables failed. 

     

    Hmm... I wonder what auto-loading is?  Have any good links to tutorials for it?

  11. I want to make an init.php file that includes my lib files and that will set my global page variable.

     

    In the include file I have...

     

    ob_start();
    session_start();
    
    date_default_timezone_set("America/New_York");
    setlocale(LC_MONETARY, 'en_US.UTF-8'); 
    
    $page = substr(end(explode(DIRECTORY_SEPARATOR, $_SERVER['PHP_SELF'])), 0, -4);
    
    $path = dirname(__FILE__);
    
    foreach (glob($path . '/lib/*.inc.php') as $lib_file)
    {
    include($lib_file);
    }
    

     

    And in my header.php file I have...

     

    $titleArray = array(
    'index' 				=> 'Home',
    );
    
    $title = $titleArray[$page];
    
    if (array_key_exists($page, $titleArray) !== false)
    {
    $title .= " | Jason's site";
    }
    

     

    But I get undefined index errors.

     

    Notice: Undefined variable: page in C:\xampp\htdocs\assets\header.php on line 7

     

    Notice: Undefined index: in C:\xampp\htdocs\assets\header.php on line 7

     

    Notice: Undefined variable: page in C:\xampp\htdocs\assets\header.php on line 9

     

    How can I make sure my init.php is being launch and that my page variable is being set?

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.