PHP
From Hostek.com Wiki
Revision as of 11:35, 1 December 2012 by Chadc (Talk | contribs) (Created page with "__FORCETOC__ ==Do you support PHP?== Yes, we support PHP on all of our Windows and Linux hosting servers. ==Do you support cURL in PHP?== Yes, we support cURL. ==mhash - I...")
Contents
Do you support PHP?
Yes, we support PHP on all of our Windows and Linux hosting servers.
Do you support cURL in PHP?
Yes, we support cURL.
mhash - Is the mhash library supported?
Yes, the mhash libary is supported with PHP.
How can I use PHP to have a form email me the results?
Here is a sample PHP script that uses submitted form information to send an email:
<? if ($HTTP_POST_VARS['to'] && $HTTP_POST_VARS['from']) { $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".$HTTP_POST_VARS['from']." <".$HTTP_POST_VARS['from'].">\r\n"; $headers .= "To: ".$HTTP_POST_VARS['to']." <".$HTTP_POST_VARS['to'].">\r\n"; $headers .= "Reply-To: ".$HTTP_POST_VARS['from']." <".$HTTP_POST_VARS['from'].">\r\n"; $headers .= "X-Priority: 1\r\n"; $headers .= "X-MSMail-Priority: High\r\n"; $headers .= "X-Mailer: A Server"; mail($HTTP_POST_VARS['to'], $HTTP_POST_VARS['subject'], $HTTP_POST_VARS['body'], $headers); echo "Mail sent to ".$HTTP_POST_VARS['to'].". \n"; } ?>