note 42578 added to function.file-get-contents

From: Date: Fri, 21 May 2004 22:37:17 +0000
Subject: note 42578 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-69928@lists.php.net to get a copy of this message
Note that when using this function (or readfile(), et. al.) to read in the contents of a URL, the request is sent with a new session ID. This could be a problem when reading from pages that are protected using a session-based login system. For example, I ran into this problem when trying to read from an ASP page, which triggered the Session_OnStart subroutine in the global.asa file, which then called a login function, which then returned a login form instead of the value that I was looking for. I ended up writing an IF clause that would circumvent the login function if the value of the SCRIPT_NAME server variable matched the ASP page I was calling from PHP. ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42578 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42578&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42578&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69928) next »