Difference between revisions of "PHP"

From Hostek.com Wiki
Jump to: navigation, search
(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...")
 
Line 3: Line 3:
 
==Do you support PHP?==
 
==Do you support PHP?==
 
Yes, we support PHP on all of our Windows and Linux hosting servers.
 
Yes, we support PHP on all of our Windows and Linux hosting servers.
 +
 +
==Can I view the PHP configuration for my site?==
 +
Yes, to do this you'll just need to create a .php file with the following code and browse to the file:
 +
 +
<pre><?php phpinfo(); ?></pre>
  
 
==Do you support cURL in PHP?==
 
==Do you support cURL in PHP?==
Line 32: Line 37:
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 
[[Category:Sales]]
 
[[Category:Sales]]
 +
[[Category:Windows]]
 +
[[Category:Linux]]

Revision as of 10:56, 5 March 2013


Do you support PHP?

Yes, we support PHP on all of our Windows and Linux hosting servers.

Can I view the PHP configuration for my site?

Yes, to do this you'll just need to create a .php file with the following code and browse to the file:

<?php phpinfo(); ?>

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";
}
?>