B4J Question Returned message from server

warayTek

Member
Licensed User
Hello there, I don't have this strange message before. I stripped down the codes to test the connection status. My php script is as shown below.
phpscript.png

This is my code to call the php script.
B4X:
Sub mnuconnect
    Private gLink As String
    Dim loginServer As HttpJob
    loginServer.Initialize("ConnectStat",Me)

    Log("Login....")
    ServerIP = "sbpxxx.com"
    gLink = "https://" & ServerIP & "/jrdinventory/jrdMainProg.php"
    Log(gLink)
    loginServer.Download2(gLink,Array As String("action","ConnectStat"))
End Sub

And this is what I got from the response:
B4X:
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Login....
https://sbxxx.com/jrdinventory/jrdMainProg.php
Back from Job: ConnectStat
Response from server: <!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Bot Verification</title>
    <script>
        function onSubmit() {
            document.getElementById('lsrecaptcha-form').submit();
        }
        var onloadCallback = function() {
            var cont = grecaptcha.render('recaptchadiv', {
                'sitekey': '6Le6iOkhAAAAAEy2qFOqtynWjdr3vsIScExJ_Maz',
                'callback': onSubmit,
                'size': 'invisible'
            });
            grecaptcha.execute(cont);
        };
    </script>
    <style>
        body {
        height: 100%;
        }
        .panel {
        padding: 30px;
        max-width: 425px;
        margin: 10% auto;
        box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.2);
        }
        .title {
        font-size: 1.5em;
        font-weight: 100;
        margin-top: 10px;
        text-align: center;
        }
        .recaptcha-center {
        margin-top: 35px;
        margin-bottom: 20px;
        margin-left: 13%;
        margin-right: 13%;
        display: block;
        }
    </style>
</head>
<body>
    <div class="panel">
        <h3 class="title">Verifying that you are not a robot...</h3>
        <form id="lsrecaptcha-form" method="POST" action="/.lsrecap/recaptcha?action=ConnectStat">
            <div id="recaptchadiv" class="recaptcha-center"></div>
        </form>
    </div>
    <script src="https://www.recaptcha.net/recaptcha/api.js?onload=onloadCallback&render=explicit"
            async defer>
    </script>
</body>
</html>
CONNECTED!

Before the message I get is "connected03", but now I get this message regarding captcha. Any idea how to resolve this issue?
 

warayTek

Member
Licensed User
The Message you got back is not from the php-code you postet. Is it the code the code from jrdMainProg.php? No, right?
There must be more involved than this single php-script.
I have reported it to the server admin, something is blocking my API script.
 
Upvote 0
Top