Verify source of url call In hook menu, there is a url that is used to be called by some gps device to register its lcoation in the database.
Let say the url is
sitename.com/gps/location/123.123/456.456

But I want to make this url, so only authenticated devices/sources can call this.

How should we achieve this. May be we can use hash token, but I am not sure how to use this to verify the source which is calling the url.

Here is the code inside the hook_menu

$items['gps/location/%/%'] = array(
  'title' =&gt; '',
  'page callback' =&gt; 'gps_lcoation_store',
  'page arguments' =&gt; array(2,3),
  'access arguments' =&gt; array('access content'),
);


Any help?
$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;
}