title: get referrer URL in wp-admin-ajax.php
body: <p>I used some X hook in function.php. I need to know which page trigger this action, need to get referrer URL and redirect to that page with success meassage.</p>
  
  <pre><code>function bp_plugin_hook_activity_posted_update( $content, $user_id, $activity_id, $event_id ) {
  
  $userEmails = 'xxx@gmail.com';
  
  if(!empty($userEmails))
      wp_mail( $userEmails, 'shared an event!', "content" , 'Content-Type: text/html' );
  
  }
  
  add_action( 'bp_activity_posted_update', 'bp_plugin_hook_activity_posted_update', 10, 3 );
  </code></pre>
  
  <p>Refer below AJAX resuest,</p>
  
  <pre><code>action:post_update
  cookie:bp-members-scope%3Dall%26bp-activity-oldestpage%3D1
  _wpnonce_post_update:df8c1689d4
  content:http://localhost/sitename/event/atx-startup-crawl-at-austin-startup-week-2017/
  event_id:1132
  visibility:followers
  object:
  _bp_as_nonce:
  </code></pre>