A voir également:
- PHP
- Easy php - Télécharger - Divers Web & Internet
- \R php ✓ - Forum PHP
- Href php ✓ - Forum PHP
- Bouton php - Forum PHP
- Echo image php ✓ - Forum PHP
21 réponses
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:00
5 janv. 2010 à 17:00
Bonjour,
utilise les variable d'environnement PHP
http://www.plb.fr/ccm/php/phpenv.php
et sauvegarde les dans un fichier
utilise les variable d'environnement PHP
http://www.plb.fr/ccm/php/phpenv.php
et sauvegarde les dans un fichier
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:05
5 janv. 2010 à 17:05
<?php
$info = $HTTP_USER_AGENT.' - '.$REMOTE_ADDR ;
$fp = fopen("fichier.txt","w");
fputs($fp,$info);
fclose($fp);
?>
tu pourrais chercher un peu !
$info = $HTTP_USER_AGENT.' - '.$REMOTE_ADDR ;
$fp = fopen("fichier.txt","w");
fputs($fp,$info);
fclose($fp);
?>
tu pourrais chercher un peu !
Marcha Pas.
Notice: Undefined variable: HTTP_USER_AGENT in *\index.php on line 3
Notice: Undefined variable: REMOTE_ADDR in *\index.php on line 3
Notice: Undefined variable: HTTP_USER_AGENT in *\index.php on line 3
Notice: Undefined variable: REMOTE_ADDR in *\index.php on line 3
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:10
5 janv. 2010 à 17:10
fallait pas faire copier coller aussi !
1ere ligne de google :
Résultats 1 à 10 sur un total d'environ 811 000 pour http_user_agent php (0,31 secondes)
Résultats de recherche
PHP Facile! Le langage PHP - Les variables prédéfinies
<?php echo "Vous utilisez un systeme d'exploitation de type: "; if (ereg("Linux", $_SERVER["HTTP_USER_AGENT"])) { echo "linux (un excellent choix)"; ...
www.phpfacile.com/...php/variables_predefinies_1.php5 - En cache - Pages similaires -
il faut rajouter les $_SERVER[".."];
1ere ligne de google :
Résultats 1 à 10 sur un total d'environ 811 000 pour http_user_agent php (0,31 secondes)
Résultats de recherche
PHP Facile! Le langage PHP - Les variables prédéfinies
<?php echo "Vous utilisez un systeme d'exploitation de type: "; if (ereg("Linux", $_SERVER["HTTP_USER_AGENT"])) { echo "linux (un excellent choix)"; ...
www.phpfacile.com/...php/variables_predefinies_1.php5 - En cache - Pages similaires -
il faut rajouter les $_SERVER[".."];
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:16
5 janv. 2010 à 17:16
moi c fonctionne ! :
<?php
$info = $_SERVER["HTTP_USER_AGENT"].' - '.$_SERVER["REMOTE_ADDR"] ;
echo $info;
$fp = fopen("fichier.txt","w");
fputs($fp,$info);
fclose($fp);
?>
si ca marche pas vérifie la version de php
<?php
$info = $_SERVER["HTTP_USER_AGENT"].' - '.$_SERVER["REMOTE_ADDR"] ;
echo $info;
$fp = fopen("fichier.txt","w");
fputs($fp,$info);
fclose($fp);
?>
si ca marche pas vérifie la version de php
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:24
5 janv. 2010 à 17:24
la réponse est la et je te la donnerais pas ! Il faut chercher un minimum !
https://www.php.net/manual/fr/function.fopen.php
https://www.php.net/manual/fr/function.fopen.php
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:32
5 janv. 2010 à 17:32
$info .= "\n"
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:35
5 janv. 2010 à 17:35
tu n'a aucune notion de programmation ?
$info = $_SERVER["HTTP_USER_AGENT"].' - '.$_SERVER["REMOTE_ADDR"] ;
$info .= "\n";
$fp = fopen("fichier.txt","a");
fputs($fp,$info);
$info = $_SERVER["HTTP_USER_AGENT"].' - '.$_SERVER["REMOTE_ADDR"] ;
$info .= "\n";
$fp = fopen("fichier.txt","a");
fputs($fp,$info);
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:42
5 janv. 2010 à 17:42
si tu ouvre ton fichier avec autre chose que le bloc note de windows cela fonctionne !!! vérifié
totofrancois
Messages postés
398
Date d'inscription
jeudi 19 novembre 2009
Statut
Membre
Dernière intervention
2 août 2013
44
5 janv. 2010 à 17:45
5 janv. 2010 à 17:45
fait voir le résultat