Change Text in id/class based on the page they redirected from in php
<p>i wan to change the text in a DIV based on the page they redirected from..</p>

<p>is there any if condition for this... or any code which helps me to do this... searched all the internet.. but didn't find it :(</p>

<p>if users reducers from google.com i want to show hello googler! if he came from my friends site, hello xxx reader. (<code>Xxx = my friends blog name</code>). if he is a direct visitor, hello visitor. like this....</p>

<p>hope you guys can help me! Thanks!!</p>

<p><strong>UPDATE</strong></p>

<p>in other question in stackoverflow, i found this ode (ASP.NET) i need a similar one in php. </p>

<p>in this ASP code he writes <code>ENDS WITH(" ")</code> but i want to write the FULL url there.</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
  string requestUrl = "";

  . . .

  if (requestUrl.ToString().EndsWith("Page1.aspx"))
    label.Text = "foo";
  else
    label.Text = "bar";
}
</code></pre>

<p>Thank you!</p>
