I have a tablet app which is able to connect to a mobile phone using the local wifi network which both devices are connected to.
My problem is bluetooth is not an available api on the tablet currently so i would like to test out using my server as a medium for when im out and about.
I would like to know if this kind of flow is possible in php?
I want to make a socket connection to php
The php code will then call another php page on the server to make a push message to the phone device
The phone device will then connect to my server and transfer images (screen captures) up to the server via socket co开发者_运维知识库nnection as fast as it can
The server will then write this data to the other socket connection (tablet)
Ambitious - certainly, but is it possible?
I am a complete beginner in php but have been coding with java for a couple of years now. Is it too much to expect to find a similar example somewhere?
Thanks for any help you can provide
Well, yeah that's possible, you can transfer data by cURL (http://www.php.net/curl), socket can be used too, But i think it's best that your tablet send a request for ex each 30secs to server to see if there is anything new to download. and also your mobile can do the same, and if there was any new images to upload, so program it to upload..
精彩评论