TheRsMonkey Posted December 29, 2007 Share Posted December 29, 2007 Heres my problem. I fairly new to php, and I don't know alot of functions, and I can't google my problem because it comes up with the opposite of what I want to do. What I need to do is Login to a website, then retrieve the source of another page which you would need to be logged in for. Some of my questions are: How can I Post my Login details on another website using PHP? Do cookies work in PHP(To show that I am logged in)? Will I be able to retrieve the source of another page once logged in? If you could show some examples of posting stuff in forms on other sites in php, and anything else that may help, that would be awesome. Much thanks in advance, The_Rs_Monkey Quote Link to comment https://forums.phpfreaks.com/topic/83540-solved-question-about-retrieving-other-page-sources/ Share on other sites More sharing options...
AndyB Posted December 29, 2007 Share Posted December 29, 2007 If you could show some examples of posting stuff in forms on other sites in php ... Sounds like a recipe for automated spam to me. Explain why you need this and perhaps someone will help (although they may have trouble understanding your question) Quote Link to comment https://forums.phpfreaks.com/topic/83540-solved-question-about-retrieving-other-page-sources/#findComment-425035 Share on other sites More sharing options...
TheRsMonkey Posted December 29, 2007 Author Share Posted December 29, 2007 Well, I asked for that kind of an example because it would help me learn how to login to the site I want via php. Quote Link to comment https://forums.phpfreaks.com/topic/83540-solved-question-about-retrieving-other-page-sources/#findComment-425040 Share on other sites More sharing options...
MadTechie Posted December 29, 2007 Share Posted December 29, 2007 read up on curl or sockets.. are you trying to login that way ? sorry no example.. sounds like scrapping to me! could be spam! Quote Link to comment https://forums.phpfreaks.com/topic/83540-solved-question-about-retrieving-other-page-sources/#findComment-425052 Share on other sites More sharing options...
TheRsMonkey Posted December 29, 2007 Author Share Posted December 29, 2007 I do not plan on spamming any sites, and if I were too (which would be useless), I definitely wouldn't be using a sever-side language. I plan on using this info on what I exactly said above. (Logging into a site and then retrieving a webpage's source code). Also, Thanks for your post MadTechie, curl might be what I was looking for. I will check back tommorrow, it is almost 11 PM and I need to get some sleep. Many thanks, The_Rs_Monkey Quote Link to comment https://forums.phpfreaks.com/topic/83540-solved-question-about-retrieving-other-page-sources/#findComment-425061 Share on other sites More sharing options...
TheRsMonkey Posted December 29, 2007 Author Share Posted December 29, 2007 It works. I ended up using sockets. Thanks so very much guys! Just 1 more question: My login details are inside the php script, should they be safe as long as no-one has access to my hosting account? Thanks The_Rs_Monkey Quote Link to comment https://forums.phpfreaks.com/topic/83540-solved-question-about-retrieving-other-page-sources/#findComment-425325 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.