bharan_n Posted November 27, 2008 Share Posted November 27, 2008 have written a Curl function to crawl a website. I was able to login and storing the cookie in a file. I am trying to initiate a new curl and tried to use the same cookie to login. It is not logging in and again asks for username and password. I am actually trying to crawl the content.I can login but i am not able to crawl the contents. it is for a vb forum i tried. i can post the site name. but i am not sure whether i can post here or not. If you can post any help related to it. Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/ Share on other sites More sharing options...
bharan_n Posted November 28, 2008 Author Share Posted November 28, 2008 Is this PHP freaks website or PHP novice website. People are not even responding to the query. If i have to post more information regarding the query. ask me to post more information. Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/#findComment-701158 Share on other sites More sharing options...
flyhoney Posted November 28, 2008 Share Posted November 28, 2008 You're not going to get any help by being an asshole. Also, we can't help you if you don't post any code. Also, nobody is getting paid here, its just people helping people out of the goodness of their hearts. So calm the hell down. Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/#findComment-701214 Share on other sites More sharing options...
bharan_n Posted November 29, 2008 Author Share Posted November 29, 2008 I am not an asshole. May be you. who knows. And you see my reply. I said do i need to post any more information. Code. $username = 'johny'; $password = 'lak8shmi'; $post_fields =array( 'vb_login_username' => $username, 'vb_login_password' => $password, 'do' => "login", 's' => '', ); $lurl = "http://www.indiancinemafans.com/board/upload/login.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$lurl); curl_setopt($ch, CURLOPT_POST, 4); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_COOKIEJAR,"cookie1.txt"); $result= curl_exec ($ch); curl_close ($ch); echo $result; $forumid = 11; preg_match('%name="securitytoken" value="(.*)"\ /\>%',$result,$security123); the above code shows the vb user was successfully logged in. After that it is redirecting to index.php but afer redirecting it is asking for username and password again. Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/#findComment-701608 Share on other sites More sharing options...
aseaofflames Posted November 29, 2008 Share Posted November 29, 2008 what's the code that you use on index.php? this might have something to do with CURLOPT_COOKIEFILE. Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/#findComment-701859 Share on other sites More sharing options...
l0ve2hat3 Posted November 29, 2008 Share Posted November 29, 2008 i hope no one helps you Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/#findComment-701940 Share on other sites More sharing options...
bharan_n Posted December 3, 2008 Author Share Posted December 3, 2008 vbulletin has lot of security related issues and i think i need to pass login details everytime. what is the otherway we can achieve it. Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/#findComment-704888 Share on other sites More sharing options...
balistic Posted December 3, 2008 Share Posted December 3, 2008 well, i am not going to help after that show of disrespect. Link to comment https://forums.phpfreaks.com/topic/134524-curl-function-problem/#findComment-704900 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.