Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Mods and Customizations

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-29-2012, 06:22 AM
vio vio is offline
Junior Member
 
Join Date: May 2012
Posts: 6
Default Restricting access by country

Hi all,

I need to allow users of one specifc country only to create/open a new ticket. Eg. only users from UK to have access to the web PAGE to create tickets.

However i want all users irrespective of country of origin to visit the WEBSITE.

Please if soneone can let me know how to do this.

Thank you.
Reply With Quote
  #2  
Old 05-29-2012, 06:45 AM
hotwired007 hotwired007 is offline
Member
 
Join Date: Jan 2012
Posts: 109
Default

you could try looking at this:

http://www.maxmind.com/app/mod_geoip

if you are running apache this should help.
Reply With Quote
  #3  
Old 05-29-2012, 07:45 PM
Corey Corey is offline
Senior Member
 
Join Date: Jan 2008
Location: St.Louis, Missouri USA
Posts: 438
Send a message via AIM to Corey Send a message via MSN to Corey Send a message via Yahoo to Corey Send a message via Skype™ to Corey
Default

Add this to main.inc.php or client.inc.php.

PHP Code:
$geo unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=" $_SERVER['REMOTE_ADDR']));
if(
$geo['geoplugin_countryCode'] != "UK")
{
    die(
"You cannot create a ticket.");

Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:39 PM.