авторизация curl - Visavi.net https://visavi.net/ RSS - Visavi.net https://visavi.net/assets/img/images/logo_small.png RSS - Visavi.net https://visavi.net/ [email protected] (admin) [email protected] (admin) Mon, 23 Dec 2024 07:43:05 +0300 Вот простая авторизация с библ. curl :<br> <pre class="prettyprint"> &lt;? $ch=curl_init(&#039;http&#58;//visavi.net/?id=1&amp;pass=1&#039;); curl_setopt($ch,CURLOPT_USERAGENT,&quot;Mozilla/5.0&quot;); curl_setopt($ch,CURLOPT_HEADER,true); curl_setopt($ch,CURLOPT_REFERER,&quot;http&#58;//visavi.net/&quot;); curl_setopt($ch,CURLOPT_COOKIEJAR,&quot;my_cookies.txt&quot;); curl_setopt($ch,CURLOPT_COOKIEFILE,&quot;my_cookies.txt&quot;); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true); curl_setopt($ch,CURLOPT_RETURNTRANSFER,0); $result=curl_exec($ch); curl_close($ch); ?&gt; </pre> https://visavi.net/topics/42480/684531 авторизация curl Сергей Sat, 11 Jul 2015 20:00:57 +0300 Сообщения https://visavi.net/topics/42480/684531 Народ помогите раньше авторизовался на вк по curl&#039;у а щас не катит: <pre class="prettyprint">$user_agent = &#039;Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv&#58;1.9.2.13) &#039; . &#039;Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)&#039;; $login = &#039;***&#039;; $password = &#039;***&#039;; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . &#039;/botvk.txt&#039;); curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . &#039;/botvk.txt&#039;); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_URL, &#039;http&#58;//login.vk.com/?act=login&#039;); $post = array( &#039;email&#039; =&gt; $login, &#039;pass&#039; =&gt; $password, ); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); $answer = curl_exec($ch); curl_close($ch);</pre> <br> в чем может быт проблема? https://visavi.net/topics/42480/684529 авторизация curl Naim Sat, 11 Jul 2015 15:50:01 +0300 Сообщения https://visavi.net/topics/42480/684529