vars_array api_id this- api_id vars_array vars_array format this- form

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
$vars_array ['api_id'] = $this->api_id;
$vars_array ['v'] = '2.0';
$vars_array ['format'] = $this->format;
$vars_array ['random'] = rand ( 0, 100000 );
$vars_array ['timestamp'] = time ();
ksort ( $vars_array );
$sig = '';
$link = $this->url;
foreach ( $vars_array as $key => $value ) {
$sig .= $key . '=' . $value;
$link .= $key . '=' . $value . '&';
}
$sig .= $this->secret;
$sig = md5 ( $sig );
$link .= 'sig=' . $sig;
return $link;