Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
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
Re: Showing different forms depending on referer with php?!??
You should ask in 1 spot.
Offline
Offline
Pages: 1
Topic closed