ne011 Posted December 16, 2010 Share Posted December 16, 2010 Hi and Greetz to you all . i was thinking , to get the cookie from inside an <iframe src="URL"></iframe>,by writing a script. Can someone help me on this ? Quote Link to comment https://forums.phpfreaks.com/topic/221897-js-help/ Share on other sites More sharing options...
bibby Posted December 21, 2010 Share Posted December 21, 2010 If the page within the iframe is on the same domain as the top page, then it's document.cookie , just as it is on top. If the iframe is points to a different domain, then the browser won't let you. That's cross site scripting, and can be evil. Quote Link to comment https://forums.phpfreaks.com/topic/221897-js-help/#findComment-1149767 Share on other sites More sharing options...
ne011 Posted December 21, 2010 Author Share Posted December 21, 2010 I was actually thinking if there exists anything to get the cookies from either frame or iframe ,so i google around before ,but could not find. Anyways thanks for the reply .. Quote Link to comment https://forums.phpfreaks.com/topic/221897-js-help/#findComment-1150033 Share on other sites More sharing options...
RichardRotterdam Posted December 22, 2010 Share Posted December 22, 2010 As mentioned before, is it url of the iframe on the same domain or a different one? If you're trying to fetch what cookie is set on a different domain then js not the way to go. You could use cURL though. Quote Link to comment https://forums.phpfreaks.com/topic/221897-js-help/#findComment-1150264 Share on other sites More sharing options...
ne011 Posted December 26, 2010 Author Share Posted December 26, 2010 Well the iframe source url will be from different location ..... Quote Link to comment https://forums.phpfreaks.com/topic/221897-js-help/#findComment-1151491 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.