[TYPO3-dev] Retrieve page as fe_user from CLI script
Jigal van Hemert
jigal at xs4all.nl
Tue Apr 27 14:56:14 CEST 2010
Hi,
I need to fetch the content of some pages from a CLI script (running in
a TYPO3 site) and see the content that some fe_users would see.
I tried the following:
- add login credentials to $_POST
- call tslib_eidtools::initFeUser() to create a fe_user object
- get ses_id and ses_name to fake the cookie info which is normally sent
by the browser
- call t3lib_div::getURL with the Cookie: header in the third argument (
array('Cookie: fe_typo_user=ba0cfab174a55f77790fdd727ca44419;') ).
The script gets a fe_user object which looks like the login succeeded
(the right record from the fe_users table is present).
There is a fe_sessions record with the ses_id created.
The page contents however do not contain access restricted content (and
yes, I checked that it works when this particular user logs in normally
in the FE).
What else do I need to "play" browser myself in this case?
--
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-dev
mailing list