Verify source of url call
$items['gps/location/%/%'] = array(
  'title' =&gt; '',
  'page callback' =&gt; 'gps_lcoation_store',
  'page arguments' =&gt; array(2,3),
  'access callback' =&gt; 'custom_is_allowed_location',
  'access arguments' =&gt; array(2, 3),
);

function custom_is_allowed_location($arg1, $arg2) {
   //IF LOCATION IS XXXXX THEN ALLOWED
   if($arg1 == xxxx &amp;&amp; $arg2 == xxxx) {
       return TRUE;
   }
   return FALSE;
}