php - Show different content after page refresh -


a .php page checks if referer xdomainname.com, if yes iframe page x if not iframe page y.

the problem want redirect page if .php page refreshed (iframe page x/y on first load only).

i tried adding cache headers .php page still iframing page x/y -depending on referer.

header( 'expires: sat, 26 jul 1997 05:00:00 gmt' ); header( 'last-modified: ' . gmdate( 'd, d m y h:i:s' ) . ' gmt' ); header( 'cache-control: no-store, no-cache, must-revalidate' ); header( 'cache-control: post-check=0, pre-check=0', false ); header( 'pragma: no-cache' ); 

other cookies, there workarround clear referer post data or detect first page load (maybe creating hidden field , detecting value on second page load)?

if (!isset($_session['pageload'])) { $_session['pageload'] = "true"; header("location:somepage.php"); } else { unset($_session['pageload']); } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -