Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I would like to implement a kind of chat. The client is Android and the server PHP.
Now I have some questions:
Is this kind of chat possible or what should be on server side? Is it recommandable to do a PHP request (maybe every second) to retrieve new data? What is the best way to realise it? What are pros and contras for php? What are good alternatives?
Don't poll your server. Chat is realtime communication. Php is not built for this kind. Push the messages to android app. You can use php to run workers, process messages, deal with db things etc. you can look into Xmpp and message queues. Gcm might be helpful. It also supports upstream messaging.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to create a real time notification system for my website(social network)
I'm using laravel 5.2,
I am using socket.io and redis currently,
I have created notifevent and broadcasted it succesfully, but no idea what to do ahead, can anyone please help me with it or guide me.
You should have a NodeJS and socket.io, install it on your server
When have event, use Redis to hold your variable and send it to your NodeJs or Use this PHP Library, you can send variable from PHP to NodeJS Server: http://elephant.io/
Data Processing on the NodeJs
Return it to PHP Webpage use Socket.io (client javascript) to catch this event and display for end-user (using emit and on)
You can follow this instruction with elephant.io: Using PHP with Socket.io
or that with Redis: https://github.com/laracasts/Laravel-Redis-and-Socket.io
You should try two ways and feedback with new question if you stuck because your question is unclear and very hard to answer
You can use javascript send Ajax Request and get variable from PHP and use this variable to make a socket.emit but this way is less security, you must use token or anything like this if you want to public your website
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm planning to make a website in PHP. At some point in future I might need to create an Android application for my website. Now I know that Android is Java based, so my question is will I be able to communicate with my application i.e. sending and receiving data from my server on which my PHP website is running and how?
The best way is to generate JSON objects using your php scripts then using JSON parser in your android app to use those objects.
Using this you easily send and receive data without having to change php scripts. You can also follow this link :
http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am working on an android application that uploads a file to my server and then gets a string response. The String requires modification before presenting to the user.Should the modification be done on the server or the phone...Which is faster?
Server is something you control. If it's slow, upgrade it. But you cannot control devices and there are plethora of them, some are high-end some are low-end.
So basically you cannot expect any processing to be fast on the device side because their performance is not uniform.
Having said that, I would suggest moving as much processing as possible to server side. A good app is light but rich. Just like Google. It's just a text field on client but behind the screen it is powered by thousands of servers.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have created a php RESTful service which respond with data in JSON format and i can easily access it with my android app, but the problem is with my WPF desktop client. Actually, i don't know a better way to call a php web service from a WPF client. Please suggest some good solutions to deal with this problem.
Your issue doesn't have anything to do with WPF, but simply .NET in general. You're looking for Windows Communication Foundation.
The learning curve is a little steep, but once you've got it set up right, consuming your service in .NET should be pretty simple.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Im planning to write a server program to communicate with iOs, android and windows phone, which would be the best language to choose. I was planning on using PHP and JSON but still confused that if it is the most efficient. Anyone with experience on this can help me pls...
Please do not mistake me if its a stupid question I'm still a beginner...
Thanks in advance.
It completely depends on what you are trying to achieve. If you are really good with php you can use it or, you can use languages such as node.js to do this. Right now we are using node.js and mongo db to save some data on our servers and sending push notification to users.
I would recommend checking parse.com API's for your backend services. They have a free tier where most of the applications will fit. If you are really sure you will have more than 1 million requests every month, then you can start thinking of your own back end. If you are writing your own backend and if you are good with javascript, node.js is your friend along with mongo db.