Android Question php and b4a socket programing

Discussion in 'Android Questions' started by ArminKH, May 25, 2015.

  1. ArminKH

    ArminKH Well-Known Member

    Hi i have a simple question
    Can we comunicate with php over socket connection?and if is possible plz explain a bit for me about that(how is possible to handle events or which type of data is supported)
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can implement a http client with the Network library. However I don't see any good reason to do so. Use HttpUtils2 instead.
    ArminKH likes this.
  3. ArminKH

    ArminKH Well-Known Member

    Erel my question is about socket programming
    My app connect 2 device over socket connection 4 send and recieve text and any objects in real time similar to chat apps
    Now are u sure this can be done by using http utils???!!!!
    I am on test to find strongest IDE for socket programming which is fast,secure,complete and totally is best for socket programming like , C#,b4j,php,c,....
    Now i'm on php
    I want to know the basics for connect real device to an other by using b4a , php over socket programming
    My search came up with noting for any relevant thread which is about my question
    Can socket lib (network library) comunicate with php over sockets?if yes any tutorial?explaintion?suggestion?
    Thank u again erel :)
  4. DonManfred

    DonManfred Expert Licensed User

    Then you have found the baddest language to build socketconnections with. Usually php have a time limit on running a process. It may not fit needs in a tcp-connection field. The best to communicate with will be b4j i believe.

    But i cant help as i never worked much with tcp-connections
    ArminKH likes this.
  5. ArminKH

    ArminKH Well-Known Member

    Thank u
    I think b4j is still under developement and new and socket programming is very large project for b4j(similar to beggining version of b4a)
    maybe the next versions of b4j be better and complete
    But for now which we develop an app with b4a you are correct because the best IDE which is simple and has best compatiblity with b4a is b4j
    Thank u again :)
    I am still so begginer and confused
  6. Erel

    Erel Administrator Staff Member Licensed User

    B4J has the same network features as B4A. They are powerful and they include all the features you need to implement a TCP or UDP socket solution.
    ArminKH likes this.
  7. yuval

    yuval Member Licensed User

    I have a similar question. i want a php page on a web server (joint account) to notify a b4j program running locally, or if possible to notify a b4a app.
    how is the best way to do this ? register a url in web database, and the php page opens a socket with this url ?
  8. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
  9. techknight

    techknight Well-Known Member Licensed User

    You can create a socket server with PHP, but you have to start that particular PHP script from the command line. it cant run through apache as apache will kill the script eventually.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice