Jump to content
gloryous666

Caut programator php

Recommended Posts

<?php
$ip = $_SERVER['REMOTE_ADDR']; 
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
if($query['regionName'] == 'England') {
echo ' <b>you are from England</b> ';
} else {
echo '<b>you are from somewhere else</b>';
}
?>

Se poate dezvolta foarte usor..

  • Upvote 2
Link to post
Share on other sites
48 minutes ago, Church said:

<?php
$ip = $_SERVER['REMOTE_ADDR']; 
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
if($query['regionName'] == 'England') {
echo ' <b>you are from England</b> ';
} else {
echo '<b>you are from somewhere else</b>';
}
?>

Se poate dezvolta foarte usor..

Am adaugat Romania in loc de England si scrie "you are from somewhere else".....

Link to post
Share on other sites

 

<?php
$ip = $_SERVER['REMOTE_ADDR']; 
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
if($query['country'] == 'Romania') {
echo ' <b>you are from England</b> ';
} else {
echo '<b>you are from somewhere else</b>';
}
?>

 

Link to post
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...