^^PHP.

wp/PHP

 

https://www.freecodecamp.org/news/the-best-php-examples/

 

 

https://www.php.net/manual/en/tutorial.php

 

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/>';
}
?>

https://conetix.com.au/support/simple-php-mail-test/

    <?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.

 

  1. If you have a Virtual Private Server (VPS), login to the server to execute:
  2. Alternatively, place the file in your httpdocs directory so that it can be called from your website.
  3. Check your email to ensure it has been delivered.
  4. If you have the file publically accessible on your website, don't forget to delete it after testing is complete!

ftp in PHP

https://www.html.it/pag/386584/php-gestione-in-locale-di-un-sito-remoto-statico/