Make the Android app as a Server..? - php

How to make the android app as Server. I installed web server in the Android device and tried to call the service from the php which is the client. Its telling that it is unable to listen to the socket. I Implemented SOAP to send the request from the Php client to the Android server. Any suggestion.>?
Or is there any other method.? other than TCP socket listening.

please read below link fetch data from server to andriod mobile
http://codeoncloud.blogspot.in/2013/07/android-mysql-php-json-tutorial.html

Related

Send push messagefrom PHP server on localhost to client on android

We are facing issue with push notification kind of feature in intranet.
we have PHP web server on localhost and client on android application.
We want to keep all devices updated even if there is update form any device.
here we can update server from client using web service but what about server to client notification.
We are using intranet only not internet so is there any push notification facility for such scenario. Because server needs to send update on all android devices if there is any change

How to send commands to gps tracker with php

I'm trying to develop php based tracking software for my gps tracker gps107.
My tracker has GPRS and I have successfully associated my tracker with open source tracking software "Traccar" which is written in java and located in my server.
But now I want to develop my own custom software for my needs in php.
I also have the protocol manual where I can see available commands and their responses.
example command for locating:
server -> device
**,imei:359586018966098,100
device -> server imei:353451044508750,001,0809231929,,F,055403.000,A,2233.1870,N,11354.3067,E,0.00,,;
How can I send these commands with php ?
The communication between server and a device is made with UDP or TCP protocol. To make this type of a connection with PHP you have to create PHP socket server. Then you assign server IP and port to your device, and the device will connect to the server as a client. After that you can receive and send commands.
PHP Doumentation about sockets: http://php.net/manual/en/book.sockets.php
Excample socket server: http://devzone.zend.com/209/writing-socket-servers-in-php/

Testing PHP Web Service locally by using android app

I am new to web services and planning to design a php webservice for my android app on my local machine which will send some user informations to database and generate some JSON data. But the problem is i am little confused about how to test it.
For example lets say that my webservice will locate on my local machine like below http://localhost:80/webservice/register.php
And my ip address is 192.168.1.X
Than is it possible for my android app to use this web service by using this url http://192.168.1.X:80/webservice/register.php
Normally since webservices are on the internet any program can access them. But i thought that i can test my webservice with my android app since both my pc and android device are on the same subnet.
If someone make things clear and tell me a way for testing a web service locally i appreciated
This is possible to call the web service in the local network also from the android app. But Your device and Your server on which Web Service running must have on the same network and Your firewall or any proxy server must be off on the server.

Soap request from php cleint to the Android Server..?

I have tried to set up a Soap connection between a Php client and making the Android app as a server. I tried it by getting the Android device Ip address and setting a request in php client..? I was not successful in doing so. Need some help with this.?

Send udp packet on LAN from web browser

I have built a simple TAPI app that will run on a machine on the LAN that connects to the office PBX, it allows me to receive dial, answer, hangup etc commands (which I was planning on receiving via a udp packet). I did this with the intention to integrate the office CRM system to the phone system.
Having done this and testing using a simple python app to send the udp packets I find myself wondering how to send the udp packets to this app given that the CRM system is a web app written in php/javascript.
We use Firefox in the office and so I was going to start with a Firefox extension, but I thought I would ask and see if anyone has any experience on sending udp packets over a lan from a browser using java or flash or from a browser extension/plugin.
Or is there a better cross browser way to send commands to an app on a network pc when the web app is hosted online?
Maybe in the CRM you could use javascript and JSONP to make a request to a local HTTP server, and that server could then send the UDP packets instead.

Categories