Setting PHP request header

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
durkine
Forum Newbie
Posts: 3
Joined: Thu Nov 08, 2007 10:35 am

Setting PHP request header

Post by durkine »

Hi,

Is the following possible in php ?

I would like to create a URL using php which contains specific information passed in the request.
For example, I would like to pass "PHP_AUTH_USER" in the request to the URL. It has to be in the request as my existing code checks the request for this value.
Basic Authentication would be the usual way I would retrieve this value but in this case I have allowed requests coming from a specific machine to access pages in my existing portal (written in php), hence PHP_AUTH_USER is not set in the request.

How can I set the PHP_AUTH_USER in the request and essentially make it persistent for any subseqent links that I click on. Other pages in the Portal rely on this being set in the header as they check for this value. If this value isn't found, the page (created using php) doesn't work.

If anyone know how to do this or could point me at documentation or in the right direction will you let me know.

Thanks,
Ed.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

What's the purpose of this?

It sounds like you are trying to recreate sessions.
Post Reply