Android Question Request a method for fetching the variable value from php to Tex in b4a

ahmed14145

New Member
Request a method for retrieving the variable value from php file to b4a. Possible method of retrieving a value Please help you, thank you
 

AlfaizDev

Well-Known Member
Licensed User
code b4a:
Sub JobDone(Job As HttpJob)
    If Job.Success Then
    Dim res As String
    res = Job.GetString
        MsgboxAsync(res,"php to Tex in b4a ")
    Else
        ToastMessageShow(" No internet connection ",True)
    
    End If
    ProgressDialogHide
  
End Sub

Sub Button1_Click
    ProgressDialogShow2("Loading",False)
    Dim PhpText As HttpJob
    PhpText.Initialize("PhpText", Me)
    PhpText.download2("http://192.168.1.5/t/1.php", _
     Array As String ("Value", ""))
    PhpText.GetRequest.Timeout=15000 
End Sub

PHP:
<?php

$Value = $_GET['Value'];

$Value="Simple, powerful and modern development tools.";

echo  $Value;

?>
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Do you mean you want to use B4A to connect to a PHP web application or REST API server and then read the response? The response is in what format? HTML, Plain Text or JSON? Can you show an example?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…