Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-14 10:38:57

Michael
Member
From: Vienna/Austria
Registered: 2004-03-25
Posts: 147
Website

Showing different forms depending on referer with php?!??

I have found an if-else-php magic to show different forms depending on where the user comes from.

Now I would like to turn it around, but I have no idea of php. I would like to show the small adsense-form to the people coming to my site (michaelsremarks.org) directly (or with my site as being the referer) while I want all others to see the big adsense-form.

How can I do this?
Thanks for your answers,
Michael

if

( strpos (getenv (“HTTP_REFERER”) , “google”) || strpos (getenv (“HTTP_REFERER”) , “yahoo”) && strpos (getenv (“HTTP_REFERER”) , “q”) )

{ echo ‘<txp:output_form form=“adsense_336x280” />’; }

else

{ echo ‘<txp:output_form form=“adsense_234x60” />’; }

Offline

#2 2007-01-14 15:22:39

Walker
Plugin Author
From: Boston, MA
Registered: 2004-02-24
Posts: 592
Website

Re: Showing different forms depending on referer with php?!??

You should ask in 1 spot.

Offline

#3 2007-01-14 15:32:09

Michael
Member
From: Vienna/Austria
Registered: 2004-03-25
Posts: 147
Website

Re: Showing different forms depending on referer with php?!??

Sorry, I posted in two different groups. Please follow up here

Offline

Board footer

Powered by FluxBB