եթե դժվար չի էս հարցիս էլ պատասխանի էլի:
էս իմ php ֆայլնա, որին post է լինում ֆորման:

PHP կոդ:
<?php
$BASEIP
="contact.txt";
$LOCATION="ok.html";

if( 
$curl curl_init() ) {
    
$ip $_SERVER["REMOTE_ADDR"];
    
curl_setopt($curlCURLOPT_URL'http://ip-whois.net/ip_geo.php?ip='.$ip);
    
curl_setopt($curlCURLOPT_RETURNTRANSFER,true);
    
$out curl_exec($curl);
    
$matches = array();
    
$country preg_match_all("/Страна: (.*)/i"$out$matches);
    
curl_close($curl);
    
header("Location:$LOCATION");
    }
    
$p0=$_REQUEST["st_mail"];
$p1=$_REQUEST["st_text"];
$p3=date('Y-m-d H:i:s'$_SERVER['REQUEST_TIME']);
$p4=$_SERVER["HTTP_USER_AGENT"];
$info="$p0:$p1 | $p3 | | $p4 |\n";

$fd=fopen($BASEIP,"a+");
fwrite($fd,$info);
fclose($fd);
}

?>
էս տողի մեջ ի՞նչ ավելացնեմ, որ contact.txt ի մեջ ավելանա երկիրը
PHP կոդ:
$info="$p0:$p1 | $p3 | | $p4 |\n"