moola Posted December 16, 2006 Share Posted December 16, 2006 Say there's a page where you have to enter my username and password... Is there a way to get php to automatically put those in and log in so i can get into my members area and get the info I want. Because if I don't log in my script won't work... Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/ Share on other sites More sharing options...
drifter Posted December 16, 2006 Share Posted December 16, 2006 not really sure what you want here?do you mean something like cookies and have the username and password pre populated?do you mean like doing a form post to by pass the login?I am guessing based on the question you are talking about some pre made script? what script? Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142551 Share on other sites More sharing options...
moola Posted December 16, 2006 Author Share Posted December 16, 2006 Maybe I should reword my question with an exampleSay I want to log on to hotmail to check my email. I want my php script to log me in and gather the information from the inbox using fget($url). If i use fget without logging in I wont be able to get my mail or access things a member cannot thats why i want to see if i can log in through the script itself without me having to do it manually. Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142589 Share on other sites More sharing options...
Hypnos Posted December 16, 2006 Share Posted December 16, 2006 If you want to write a script like you said (checking your hotmail email), then you have to have it login, get the cookie, and send the cookie back when it requests the page for your inbox. Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142593 Share on other sites More sharing options...
trq Posted December 16, 2006 Share Posted December 16, 2006 Take a look at the [url=http://php.net/curl]curl[/url] extension. Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142595 Share on other sites More sharing options...
drifter Posted December 16, 2006 Share Posted December 16, 2006 there is a class on phpclasses.org that I found that uses the curl extensions. - It has cookie collection and such built in.I did a search there last week for "post request" and found it. Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142597 Share on other sites More sharing options...
moola Posted December 17, 2006 Author Share Posted December 17, 2006 [quote author=Hypnos link=topic=118891.msg486301#msg486301 date=1166304469]If you want to write a script like you said (checking your hotmail email), then you have to have it login, get the cookie, and send the cookie back when it requests the page for your inbox. [/quote]How do you get it to login??Thanks I'll check the curl extension. Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142658 Share on other sites More sharing options...
NHStars Posted December 17, 2006 Share Posted December 17, 2006 You can also use a socket connection and send raw http requests. I used to do this a lot in Visual Basic and it works just the same with php. Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142700 Share on other sites More sharing options...
moola Posted December 17, 2006 Author Share Posted December 17, 2006 Ok this isn't helping too much because I'm a newbie at php. I'm really not sure how to do it Link to comment https://forums.phpfreaks.com/topic/30896-can-i-log-onto-a-page-automatically/#findComment-142738 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.