AriGharavi
Member
Hi guys!
I have problem with sending request with okhttputils2 and httputils.
this is my code :
I have host too. and this is my php host code
Log :
ResponseError. Reason: javax.net.ssl.SSLHandshakeException: Unacceptable certificate: CN=COMODO RSA Certification Authority, O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB, Response:
I have problem with sending request with okhttputils2 and httputils.
this is my code :
Code:
#Region Project Attributes
#ApplicationLabel: B4A_register
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim ht As HttpJob
Private Button1 As Button
Private EditText1 As EditText
Private EditText2 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
ht.Initialize("register",Me)
End Sub
Sub Jobdone (job As HttpJob)
If job.Success = True Then
Msgbox(job.GetString,"Success")
Else
//Err Message
ToastMessageShow("خطا در برقراری اتصال" , False)
End If
End Sub
Sub Button1_Click
Dim send As String
send = "username="&EditText1.Text&"&password="&EditText2.Text
ht.PostString("https://ariteam.gigfa.com/TF.php",send)
End Sub
I have host too. and this is my php host code
PHP:
<?php
function test() {
$conn = new mysqli ("localhost","my username","my password", "my db name");
mysqli_select_db('Romance',$conn);
mysqli_set_charset('utf8');
$username=$_POST['username'];
$password=$_POST['password'];
if (!$conn)
{
echo "Error: Unable to connect to MySQL.";
echo "Debugging errno: " . mysqli_connect_errno();
echo "Debugging error: " . mysqli_connect_error();
}
else
{
$result = "INSERT INTO RomReg(`Username`, `Password`, `Coins`) VALUES '$username','$password',10)";
if(mysqli_query($result)){
echo "Done";
}else{echo "Error";}
}
}
echo test();
?>
Log :
ResponseError. Reason: javax.net.ssl.SSLHandshakeException: Unacceptable certificate: CN=COMODO RSA Certification Authority, O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB, Response: