johnwayne77 Posted February 20, 2008 Share Posted February 20, 2008 I was wondering how can i make a script to login to a site, keep its status as logged and for example surf its account (2, 3 pages) without getting logged out? Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/ Share on other sites More sharing options...
Chris92 Posted February 20, 2008 Share Posted February 20, 2008 With sessions or cookies. Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471672 Share on other sites More sharing options...
rhodesa Posted February 20, 2008 Share Posted February 20, 2008 Quick google search came up with this tutorial: http://www.phpeasystep.com/workshopview.php?id=6 Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471673 Share on other sites More sharing options...
revraz Posted February 20, 2008 Share Posted February 20, 2008 Sounds like he wants a bot that does this on another site, not his own. Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471675 Share on other sites More sharing options...
rhodesa Posted February 20, 2008 Share Posted February 20, 2008 Ah, if you want a PHP script for that it gets tricky. Cus cURL and similar modules make a new connection each page call. I use this, which is way over the top for what you need to do, but it's the only thing I've found that does it. http://simpletest.sourceforge.net/ Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471684 Share on other sites More sharing options...
dave420 Posted February 20, 2008 Share Posted February 20, 2008 Curl is perfect for this. It can keep its cookies across multiple requests, so it will stay logged in. Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471697 Share on other sites More sharing options...
rhodesa Posted February 20, 2008 Share Posted February 20, 2008 Wow, just read up on php.net/curl and see that stuff was added in PHP 5.1. Good to know! Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471708 Share on other sites More sharing options...
johnwayne77 Posted February 20, 2008 Author Share Posted February 20, 2008 YEAH, SO I WANT TO LOGIN TO A SITE (WWW.EXAMPLE.COM) AND BROWSE PAGE1.HTM, PAGE2.HTM, PAGE3.HTM, AVAILABLE ONLY IF I AM LOGGED IN SO U R SAYING CURL IS NOT DOING THE JOB? I WAS THINKING OF USING THAT... ANY OTHER IDEAS? Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471713 Share on other sites More sharing options...
Chris92 Posted February 20, 2008 Share Posted February 20, 2008 I would just use cookies. Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471715 Share on other sites More sharing options...
rhodesa Posted February 20, 2008 Share Posted February 20, 2008 YEAH, SO I WANT TO LOGIN TO A SITE (WWW.EXAMPLE.COM) AND BROWSE PAGE1.HTM, PAGE2.HTM, PAGE3.HTM, AVAILABLE ONLY IF I AM LOGGED IN SO U R SAYING CURL IS NOT DOING THE JOB? I WAS THINKING OF USING THAT... ANY OTHER IDEAS? It looks like cURL can handle is as of PHP 5.1, but I haven't worked with it before. Looking around on google, here is a script for interacting with Amazon the way you describe: http://www.weberdev.com/get_example-4555.html Link to comment https://forums.phpfreaks.com/topic/92108-self-login-bot-stay-logged-browse-site/#findComment-471732 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.