lucky678 Posted June 10, 2013 Share Posted June 10, 2013 (edited) CURL SCRIPT cookie NOT SAVEING.HELP PLESE.USER AND PASS IS NOT MY. IT IS DEMO AC AND WORKING. <?php $username = "8085276420"; $password = "10914917"; $cookie = tempnam("/coki", "CURLCOOKIE"); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,"http://www.site2sms.com/login.asp"); curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_REFERER,"http://www.site2sms.com/login.asp"); $one=curl_exec($ch); print $one; $post_data = "userid=$username&password=$password&Submit=Sign+in"; $url = "http://www.site2sms.com/auth.asp"; $ch = curl_init(); curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/7.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0" ); curl_setopt( $ch, CURLOPT_URL, $url ); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language: en-US,en;q=0.5","Accept-Encoding: gzip","DNT: 1","Connection: keep-alive")); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt($ch,CURLOPT_REFERER,"http://www.site2sms.com/login.asp"); $ct = curl_exec( $ch ); print $ct; $url3 = "http://www.site2sms.com/user/dashboard.asp"; $ch = curl_init(); curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/7.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0" ); curl_setopt( $ch, CURLOPT_URL, $url3 ); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language: en-US,en;q=0.5","Accept-Encoding: gzip","DNT: 1","Connection: keep-alive")); curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt($ch,CURLOPT_REFERER,"http://www.site2sms.com/login.asp"); $cct = curl_exec( $ch ); print $cct; ?> Edited June 10, 2013 by lucky678 Quote Link to comment Share on other sites More sharing options...
lucky678 Posted June 11, 2013 Author Share Posted June 11, 2013 (edited) CURL SCRIPT cookie NOT SAVEING.HELP PLESE.USER AND PASS IS NOT MY. IT IS DEMO AC AND WORKING. <?php $username = "8085276420"; $password = "10914917"; $cookie = tempnam("/coki", "CURLCOOKIE"); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,"http://www.site2sms.com/login.asp"); curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_REFERER,"http://www.site2sms.com/login.asp"); $one=curl_exec($ch); print $one; $post_data = "userid=$username&password=$password&Submit=Sign+in"; $url = "http://www.site2sms.com/auth.asp"; $ch = curl_init(); curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/7.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0" ); curl_setopt( $ch, CURLOPT_URL, $url ); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language: en-US,en;q=0.5","Accept-Encoding: gzip","DNT: 1","Connection: keep-alive")); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt($ch,CURLOPT_REFERER,"http://www.site2sms.com/login.asp"); $ct = curl_exec( $ch ); print $ct; $url3 = "http://www.site2sms.com/user/dashboard.asp"; $ch = curl_init(); curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/7.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0" ); curl_setopt( $ch, CURLOPT_URL, $url3 ); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language: en-US,en;q=0.5","Accept-Encoding: gzip","DNT: 1","Connection: keep-alive")); curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt($ch,CURLOPT_REFERER,"http://www.site2sms.com/login.asp"); $cct = curl_exec( $ch ); print $cct; ?> finly cokkeis provlem solved but this script print whole 3 pages . also i remooved print $one; print $ct; print $cct;........i am unable to understand why printed whole page. Edited June 11, 2013 by lucky678 Quote Link to comment 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.