Setting Referer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Etherguy
Forum Commoner
Posts: 70
Joined: Fri Nov 01, 2002 9:09 pm
Location: Long Island, New York

Setting Referer

Post by Etherguy »

I was wondering if there is a way to set the referal address that is passed to a web server. I am trying to test out a script that looks at the referal address and then populates with different prices based on the referal.

Since I am doing this in a labbed enviroment, I need to be able to change the referal on the fly ( ie... google, yahoo) as the source.

Any suggestions ??
User avatar
Slippy
Forum Contributor
Posts: 113
Joined: Sat Jul 12, 2003 11:31 pm
Location: Vancouver eh!

Post by Slippy »

Do you mean like?

Code: Select all

<?php 
echo $_SERVER&#1111;'HTTP_REFERER']; 
?>
or the other way? If you mean the other way... check out CURL... it has functions that can be compiled into PHP. You can also run it from the command line... CURL allows you to change such items when you request the page.
Post Reply