Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link
doub1ejack
  • 837
  • 1
  • 9
  • 36

Rules: how to create variable with PHP and $_SERVER['HTTP_REFERRER']

I want to parse the query string off the HTTP_REFERRER and make that available as a variable for actions to use.

I feel like one of these options should let me do that, but I can't be sure...

enter image description here

The concept is simple

<?php 
  $parts = parse_url( $_SERVER['HTTP_REFERRER'] );
  parse_str( $parts['query'], $q );
  // now set $q (or its elements) as the variable
?>