如何在自己的站点上查看从其他站点收到的reCaptchav3?

时间:2019-07-16 13:57:51

标签: php request httpwebrequest recaptcha php-curl

我正在开发一个可以更快地注册“ http://uyeler.mynet.com/index/newregister/v4register.htm”的应用程序。如何将此reCAPTCHA对象移动到我自己的应用程序中?我使用编写的代码输入了站点,但是发送给reCAPTCHA的帖子数据没有出现错误。你能帮我完成代码吗?

<?php
    function open($url, $cookie = "")
        {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $url);  
            curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36');
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_COOKIE, 1);
            curl_setopt($ch, CURLOPT_HTTPHEADER, 
                    'Host: uyeler.mynet.com',
                    'Connection: keep-alive',
                    'Upgrade-Insecure-Requests: 1',
                    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
                    'Accept-Encoding: gzip, deflate, br',
                    'Accept-Language: tr,en-US;q=0.9,en;q=0.8');
            if($cookie != "")
        {
            curl_setopt($ch, CURLOPT_COOKIEJAR, realpath(dirname(__FILE__))."\cookie.txt");
        }
        else
        {
            curl_setopt($ch, CURLOPT_COOKIEFILE, realpath(dirname(__FILE__))."\cookie.txt");
        }
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
        curl_setopt($ch, CURLOPT_REFERER, "https://uyeler.mynet.com/index/login.jsp?username=warriorlogos888&epassword=B3890FDDC2283310597FDEB9C81B9D4BMGEGCSsGAQQBgjdYA6BUMFIGCisGAQQBgjdYAwGgRDBCAgMCAAECAmYBAgFABAhdBQY3Rk8vVQQQQEhJTWVxPlV8QhplAB0mfgQYUwdNYnZGatJd76DLcU2DVWAXYrL43MQW&success=https%3A%2F%2Fuyeler.mynet.com%2Findex%2Fnewregister%2Fv4register-two.htm%3Ftmpl%3Dpage%26myneteposta%3D1%26kampanya%3D0&rurl=%2F%2Feposta.mynet.com%2Findex%2Fmymail.html&myneteposta=1&backUyeOl=noBackUyeOl&isMynetIos=false&mynetepostaurl=%3Frand%3D0.0261665660346867%26mynet%3D0%26rurl%3D%2F%2Feposta.mynet.com%2Findex%2Fmymail.html%26referringurl%3Dnull&isMusteriHizmeleri=false");
        $result = curl_exec($ch); 
        $json= json_decode($result, true);
        curl_close($ch);
        return $result;
    }
        open("http://uyeler.mynet.com/index/newregister/v4register.htm?tmpl=page", 1);
    echo open("https://uyeler.mynet.com/index/newregister/v4register-two.htm?tmpl=page&myneteposta=1&kampanya=0",0);
?>

0 个答案:

没有答案