HTTP Module - Cookies Problem

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
PeterBelm
Forum Newbie
Posts: 2
Joined: Fri Jun 12, 2009 6:03 am

HTTP Module - Cookies Problem

Post by PeterBelm »

I'm trying to use the HttpRequest class to make a site availability checker, but to make sure the target site is working properly I need to store cookies. This was easy enough with:

Code: Select all

$request = new HttpRequest($url, HTTP_METH_POST, array('referer' => 'http://www.mysite.abc/index.php', 'cookiestore' => './mysite_cookies'));
The problem is it doesn't create the file. If I create an empty file for it, all it does is read it (I debugged the process to find that out) yet it still stores the cookies somewhere, because they're present in all the raw messages. I need to be able to clear the cookie store when a session has expired, and without it actually storing the cookies in the file I've told it to, I can't figure out how to do that.
Last edited by Benjamin on Fri Jun 12, 2009 5:39 pm, edited 1 time in total.
Reason: Changed code type from text to php.
User avatar
akuji36
Forum Contributor
Posts: 190
Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut

Re: HTTP Module - Cookies Problem

Post by akuji36 »

PeterBelm
Forum Newbie
Posts: 2
Joined: Fri Jun 12, 2009 6:03 am

Re: HTTP Module - Cookies Problem

Post by PeterBelm »

I think you misunderstood what I was asking, I don't need to store/get cookies from the client, I'm trying to use HttpRequest to be a client.
Post Reply