Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xml:lang="fr" lang="fr">
- <head>
- <title> Notre première instruction </title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv= "refresh" content="5" />
- </head>
- <body>
- <?php
- try{
- $bdd = new PDO('mysql:host=localhost;dbname=test3', 'root', '');
- }
- catch(Exception $e){
- die('Erreur : '.$se->getMessage());
- }
- $homepage = file_get_contents('http://172.20.107.22/');
- $jour=date('Y-m-d');
- $heure=date('H:i:s');
- $bdd->exec("INSERT INTO capteur (id, texte , date_jour) VALUES(NULL, '$homepage' , '$jour')");
- echo ('La valeur est');
- echo ($homepage);
- echo("le");
- echo($jour);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement