You can grap the source IP and display the text in a switch/case statement like below.
Code:
switch ($_SERVER['HTTP_REFERER']){
case "24.24.24.24":
echo "whatever for 24.24.24.24";
break;
case "1.1.1.1":
echo "whatever for 1.1.1.1";
break;
default:
echo "whatever - if IP not in above cases";
break;
}
Hope that helps!