mavera2 Posted September 22, 2011 Share Posted September 22, 2011 I'm sorry if this is a silly question. When user logins to some other site, he gets a member page. Without login he gets a guest page. I want to write a code that takes member page and parses it, then shows user some parts of it user will select which parts to see. but when i use "file_get_contents", output becomes a guest page, i suppose it is because my php server takes it without user's login data. Is it possible to take member page and parse it ? Because i don't want user to give his login information to my site. Thank you very much for your help. Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/ Share on other sites More sharing options...
Buddski Posted September 22, 2011 Share Posted September 22, 2011 So you are trying to read a websites 'members section' into your own website? Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1271749 Share on other sites More sharing options...
mavera2 Posted September 22, 2011 Author Share Posted September 22, 2011 i won't use the member info for myself. i will parse it and show the user with a cleaner interface. you know twitter and facebook provides you with authorizing your application with user's approval. but most of the websites doesn't provide authorizing or apis. Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1271762 Share on other sites More sharing options...
.josh Posted September 23, 2011 Share Posted September 23, 2011 you will need to use curl instead of file_get_contents, to automate setting cookies and logging into the member area. Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1271881 Share on other sites More sharing options...
xyph Posted September 23, 2011 Share Posted September 23, 2011 The user will have to submit their password to you at some point, or you will have no way to access their information. If you could access those pages without the user submitting their password, anyone could. Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1271887 Share on other sites More sharing options...
mavera2 Posted September 24, 2011 Author Share Posted September 24, 2011 i'm sorry but confused.. is it possible with curl() as .josh said or not possible as xyph said ?? Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1272300 Share on other sites More sharing options...
xyph Posted September 24, 2011 Share Posted September 24, 2011 It's possible with curl() if they give yo their passwords Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1272314 Share on other sites More sharing options...
mavera2 Posted September 24, 2011 Author Share Posted September 24, 2011 It's possible with curl() if they give yo their passwords thank you for help xyph. I suppose that i must use javascript to get the member's contents. Then send the data to php server parse it and show it with my interface. Is there some similar example or which commands should i look for. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1272329 Share on other sites More sharing options...
xyph Posted September 24, 2011 Share Posted September 24, 2011 JavaScript will not allow you to access cookies set with another domain. Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1272339 Share on other sites More sharing options...
mavera2 Posted September 24, 2011 Author Share Posted September 24, 2011 JavaScript will not allow you to access cookies set with another domain. not to reach to cookies. Reaching the contents of the page. Quote Link to comment https://forums.phpfreaks.com/topic/247654-file_get_contents-as-clint-side-cookies/#findComment-1272352 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.