[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

html marking

Posted on 2011-10-15
6
Medium Priority
?
174 Views
Last Modified: 2012-05-12
I see the following code in one of the utilities I would like to use.  I do not understand the
--PHP-mixed- marking. lookd like it should print.  I see places with different text but starting with a -- and ending with a -.  Can you explain this or point me to a place where it is explained.
It's used twice in this snippet.

--PHP-mixed-<?php echo $random_hash; ?>  
      Content-Type: multipart/alternative; boundary="<?php echo $random_hash; ?>";
      
      --PHP-mixed-<?php echo $random_hash; ?>
0
Comment
Question by:artwilkes
  • 3
  • 2
6 Comments
 

Author Comment

by:artwilkes
ID: 36975146
I have a slightly different problem, than the one you pointed me to.
the --PHP-mixed- syntax is outside ofthe PHP markers. hence It can not be a php comment, can it?
If you look at the third example at the following reference, emailing an attachment, you will see this command, comment or market is prevelant in the code.

http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php

Thanks for the effort.
0
 
LVL 9

Expert Comment

by:user_n
ID: 36975170
it looks like that  --PHP-mixed-  is pointing where is the php code. The code looks like a multipart http request or http response http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html

--PHP-mixed-<?php echo $random_hash; ?>  
      Content-Type: multipart/alternative; boundary="<?php echo $random_hash; ?>";
     
      --PHP-mixed-<?php echo $random_hash; ?>
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 36975176
This:

--PHP-alt-<?php echo $random_hash; ?>

is making a boundary marker in the email.  Boundary markers are put between different MIME types and embedded images so that email clients can figure out what to do.  This http://mailformat.dan.info/headers/mime.html may explain it better.  The first important part is that the boundary start at the first column on a line with '--' as the first two characters.  The second thing is that they should be 'unique'.
0
 

Author Closing Comment

by:artwilkes
ID: 36976053
That's two for two for DaveBaldwin, one yesterday and one today, and the reference was great.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question