wp/PHP
https://www.freecodecamp.org/news/the-best-php-examples/
https://www.php.net/manual/en/function.echo.php
<?php phpinfo(); ?>
$_SERVER
man —
Server and execution environment information. Array containing information such
as headers, paths, and script locations.
<?php //////////////////// $_SERVER['HTTP_USER_AGENT']
echo $_SERVER['HTTP_USER_AGENT'],'<br/>';
?> <?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { echo 'You are using Internet Explorer.<br/>'; } else { echo 'You are not using Internet Explorer.<br/>'; }
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE) { echo 'You are using Firefox.<br/>'; } ?>
<?php ini_set( 'display_errors', 1 ); error_reporting( E_ALL ); $from = "[email protected]"; $to = "[email protected]"; $subject = "PHP Mail Test script"; $message = "This is a test to check the PHP Mail functionality"; $headers = "From:" . $from; mail($to,$subject,$message, $headers); echo "Test email sent"; ?>
La mail viene inviata con qualsiasi "From:".
Se invio con "From:" col dominio diverso da quello vero "robertoocca.net", la ricezione in libero.it finisce in spam.
https://www.html.it/pag/386584/php-gestione-in-locale-di-un-sito-remoto-statico/