Forum Moderators: coopster

Message Too Old, No Replies

Using file() to get page with Cookies?

         

planbeta

2:12 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



Hello!

Using file() I can grab a page and spit out selected parts of it using php, but I need to grab a page that needs a cookie login set before you can access the page, is there any way to do this with straight php?

Cheers

Chris

coopster

7:24 pm on Mar 15, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Is it possible for you to set the $_COOKIE variable before you read the file?

$_COOKIE['value'] = 'whatever';
$lines = file('http://www.whatever.com');