SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is this? What kind of hack is this?

    Hi,
    I received an email with this on the subject:

    $subject = "=?UTF-8?B?CgoKDQpTYXkgaGVsbG8gdG8gbmV3IFpvcnBpYW5zIGZyb20gUG9ydHVnYWwNCg0K?=";


    And in windows live mail, the title's size gets deformed by that string subject, like this:



    But, somehow, i cant change the title that says "Say hello to new Zorpians from Portugal", because is somewhere embed in those strange chars on the subject.

    How can i change the title?

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2006
    Location
    Wigan, Lancashire. UK
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't know what Windows live mail is doing, but iconv_mime_decode converts it perfectly happily as "Say hello to new Zorpians from Portugal" without any spurious additional characters aside from a couple of line feeds
    ---
    Development Projects:
    PHPExcel
    PHPPowerPoint

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mark Baker View Post
    Don't know what Windows live mail is doing, but iconv_mime_decode converts it perfectly happily as "Say hello to new Zorpians from Portugal" without any spurious additional characters aside from a couple of line feeds
    nice.
    how can i encode a new one?

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Say hello to new Zorpians from Portugal"

    Encoded by PHP:

    =?ISO-8859-1?B?U2F5IGhlbGxvIHRvIG5ldyBab3JwaWFucyBmcm9tIFBvcnQ=?= =?ISO-8859-1?B?dWdhbA==?=

    Encoded by them:

    =?UTF-8?B?CgoKDQpTYXkgaGVsbG8gdG8gbmV3IFpvcnBpYW5zIGZyb20gUG9ydHVnYWwNCg0K?=


    The same string is encoded different ways.... The buggy one is the last... How? Even knowing one is UTF the other is ISO...

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2006
    Location
    Wigan, Lancashire. UK
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
     echo iconv_mime_decode("?UTF-8?B?CgoKDQpTYXkgaGVsbG8gdG8gbmV3IFpvcnBpYW5zIGZyb20gUG9ydHVnYWwNCg0K?=",ICONV_MIME_DECODE_STRICT).'<br>'
    ICONV_MIME_DECODE_STRICT is a constant, not a string value
    ---
    Development Projects:
    PHPExcel
    PHPPowerPoint

  6. #6
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mark Baker View Post
    PHP Code:
     echo iconv_mime_decode("?UTF-8?B?CgoKDQpTYXkgaGVsbG8gdG8gbmV3IFpvcnBpYW5zIGZyb20gUG9ydHVnYWwNCg0K?=",ICONV_MIME_DECODE_STRICT).'<br>'
    ICONV_MIME_DECODE_STRICT is a constant, not a string value
    yes i know


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •