title: How to pass HTTP referrer to PHP script
body: <p>This seems like it should be simple. Any pointers would be much appreciated.</p>
  
  <p>Consider three sites:</p>
  
  <ul>
  <li>widgetserver.com, which serves widgets to client sites
  <li>clientsite.com, which displays the widget
  <li>previoussite.com, which is a site that links to clientsite.com
  </ul>
  
  <p>In clientsite.com's page there is a piece of code that calls a PHP function on widgetserver.com. It looks like this:</p>
  
  <p><code>&lt;script type="text/javascript" src="http://widgetserver.com/show_widget.php&gt;&lt;/script&gt;</code></p>
  
  <p>When clientsite.com is loaded, it runs "show_widget.php", which in turn places the widget on the page.</p>
  
  <p>This is where I am stuck: I would like to access the site that referred the user to clientsite.com from inside "show_widget.php", but while in this function we are on widgetserver.com, so the referrer is clientsite.com, not previoussite.com.</p>
  
  <p>Is there any way I can pass clientsite.com's referrer to "show_widget.php"?</p>