Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML $cookie_file = 'cookie.txt' ; $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, 'https://passport.yandex.ru/passport?mode=auth' ); curl_setopt( $ch , CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6' ); curl_setopt( $ch , CURLOPT_REFERER, 'http://mail.yandex.ru/' ); curl_setopt( $ch , CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $ch , CURLOPT_COOKIEJAR, $cookie_file ); curl_setopt( $ch , CURLOPT_COOKIEFILE, $cookie_file ); $header = array (); $header [] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ; $header [] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' ; $header [] = 'Accept-Language: ru,en-us;q=0.7,en;q=0.3' ; $header [] = 'Pragma: ' ; curl_setopt( $ch , CURLOPT_HTTPHEADER, $header ); curl_setopt( $ch , CURLOPT_POST, true ); $fields = array (); $fields [] = 'login=xxxxx' ; $fields [] = 'passwd=xxxxx' ; $fields [] = 'retpath=xxxxx' ; $fields [] = 'twoweeks=yes' ; curl_setopt( $ch , CURLOPT_POSTFIELDS, implode( '&' , $fields )); curl_setopt( $ch , CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch , CURLOPT_AUTOREFERER, true ); curl_exec( $ch ); curl_close( $ch );
Copy Source | Copy HTML
- <? php
- $ data = implode ( '' , file ( $ uploadfile ));
- $ data = json_decode ( $ data );
- unlink ( $ uploadfile );
- $ lines = parseData ( $ data );
- function parseData ( $ data )
- {
- $ lines = array ();
- foreach ( $ data -> { 'log' } -> { 'pages' } as $ page ) {
- $ exclude_url = array ();
- foreach ( $ data -> { 'log' } -> { 'entries' } as $ entrie ) {
- if ( $ entrie -> { 'pageref' }! = $ page -> { 'id' }) continue ;
- if (! empty ( $ exclude_url [ $ entrie -> { 'request' } -> { 'url' }])) continue ;
- if ( false and preg_match ( '/\d+-\d+-\d+T\d+:\d+:\d+\.(\d+)/' , $ entrie -> { 'startedDateTime' }, $ m )) {
- $ id = strftime ( '% Y% m% d% H% M% S' , strtotime ( $ entrie -> { 'startedDateTime' })). $ m [ 1 ];
- } else {
- $ id = $ entrie -> { 'startedDateTime' };
- }
- $ lines [ $ id ] [] = '$ cookie_file = \' cookie.txt \ ';' ;
- $ lines [ $ id ] [] = '' ;
- $ headers = array ();
- foreach ( $ entrie -> { 'request' } -> { 'headers' } as $ header ) {
- $ headers [ $ header -> { 'name' }] = $ header -> { 'value' };
- }
- $ lines [ $ id ] [] = '$ ch = curl_init ();' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_URL, \' ' . $ entrie -> { ' request ' } -> { ' url ' }. ' \ ');' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_USERAGENT, \' ' . $ headers [ ' User-Agent ' ]. ' \ ');' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_REFERER, \' ' . $ headers [ ' Referer ' ]. ' \ ');' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_ENCODING, \' ' . $ headers [ ' Accept-Encoding ' ]. ' \ ');' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_COOKIEJAR, $ cookie_file);' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ cookie_file);' ;
- $ lines [ $ id ] [] = '' ;
- $ lines [ $ id ] [] = '$ header = array ();' ;
- $ lines [ $ id ] [] = '$ header [] = \' Accept: ' . $ headers [ 'Accept' ]. '\'; ' ;
- $ lines [ $ id ] [] = '$ header [] = \' Accept-Charset: ' . $ headers [ 'Accept-Charset' ]. '\'; ' ;
- $ lines [ $ id ] [] = '$ header [] = \' Accept-Language: ' . $ headers [ 'Accept-Language' ]. '\'; ' ;
- $ lines [ $ id ] [] = '$ header [] = \' Pragma: \ ';' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_HTTPHEADER, $ header);' ;
- switch ( $ entrie -> { 'request' } -> { 'method' }) {
- case 'GET' :
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_POST, false);' ;
- break ;
- case 'POST' :
- if ( $ entrie -> { 'request' } -> { 'postData' } -> { 'mimeType' } == 'application / x-www-form-urlencoded' ) {
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_POST, true);' ;
- } else {
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_POST, false);' ;
- }
- $ lines [ $ id ] [] = '' ;
- $ lines [ $ id ] [] = '$ fields = array ();' ;
- foreach ( $ entrie -> { 'request' } -> { 'postData' } -> { 'params' } as $ param ) {
- $ lines [ $ id ] [] = '$ fields [] = \' ' . $ param -> { 'name' }. '=' . $ param -> { 'value' }. '\'; ' ;
- }
- $ lines [ $ id ] [] = '' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_POSTFIELDS, implode (\' & \ ', $ fields));' ;
- break ;
- default :
- die (print_r ( $ entrie ));
- }
- if ( $ entrie -> { 'response' } -> { 'status' } == '302' ) {
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, true);' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_AUTOREFERER, true);' ;
- $ exclude_url [ $ entrie -> { 'response' } -> { 'redirectURL' }] = true ;
- } else {
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, false);' ;
- $ lines [ $ id ] [] = 'curl_setopt ($ ch, CURLOPT_AUTOREFERER, false);' ;
- }
- $ lines [ $ id ] [] = 'curl_exec ($ ch);' ;
- $ lines [ $ id ] [] = 'curl_close ($ ch);' ;
- $ lines [ $ id ] [] = '' ;
- }
- }
- return $ lines ;
- }
- ?>
Source: https://habr.com/ru/post/84683/
All Articles