iOs in app chat [closed] - php

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
So I have an app that includes peer to peer chat, which is only between two users at a time. What I am doing now is upon the user typing a new message, it calls a PHP script which inserts the message into a mysql table. then every 5 seconds the code calls a php script which downloads all the messages. So there is a maximum 10 second gap between messages. So my question is if there is a better way to do peer to peer chat.

You can use the server as a matchmaker - use it only to find the other phone. You provide the IP address so that one phone can contact the other phone and initiate a connection. One of the phones act as a chat server.
You can read about sockets programming with Cocoa for example here: http://cocoawithlove.com/2009/07/simple-extensible-http-server-in-cocoa.html

You can check out something like IP Messaging with Twilio.
In the iOS quickstart (https://www.twilio.com/docs/api/ip-messaging/guides/quickstart-ios) you can try it out in Objective-C or Swift.
The server side app there (in PHP) manages identity and access tokens for the application and the simple/example UI you end up with is this:
[Note: I work for Twilio]

Related

Send push notifications from website to pwa [closed]

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 3 years ago.
Improve this question
We have an app that has separate pwa and standard web site made in CodeIgniter(PHP framework).
Is there a way to send push notifications from a web site version of the app, to the pwa users that never visited the website?
For example when somebody post a comment on a user picture using the web site, is there a way to notify the pwa user?
From the research I've done, its possible to send the notifications from website if user accepts them, but if used that method, user would first have to visit the website on their cell phone and accept the push notifications. That is not very user friendly.
Ideally, the user would just use the pwa, accept the notifications there, and actions on the website would trigger notifications to the pwa-s user cellphone.
No.
Browser based notifications are designed to be opt-in. That policy is enforced by the browser.
Without that our phones would be buzzing 24 hours a day.
You could build a native app that does notifications.

Web notifications subscribers data - endpoint - send notifications [closed]

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 4 years ago.
Improve this question
I'm trying to understand how web notification(HTML5) is works.
I found some solutions for call user for permissions:notify.js,
currently I am looking for any way to send notifications for subscribed users. I planing to create a backend script in PHP. What kind of data, should I save when user allows notifications receiving, for easy sending notifications?
There are two kinds of web notifications:
on-site push notifications: you can send them only when a user has a page of your website open. You can use the Web Notification API (or notify.js) to display the notification. You also need to fetch the notification from a server: you can use AJAX, long polling, websockets, etc.
off-site push notifications: you can reach a user even when he is not on your website. You need to use the Web Notification API together with the W3C Push API and service workers. In this case you need to collect an endpoint that represents the user device (browser), then store it on a server and then send notifications to it (for example using this PHP library). Otherwise you can use a service like Pushpad (I am the founder) which offers a PHP library.

Scheduled Email Notification using PHP [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I want to add a scheduled email notification system in my project. I developed a php based registration system where the client and Realtor create a account. In the registration process the client and Realtor will enter their zipcodes.
Is there a way to create a php script that will automatically scan through the database to check and see if the client and Realtor zipcodes match, that will do this on a scheduled task and that will email the Realtor when a client zipcode matches the Realtor zipcode. I'm still a php newbie so please professional suggestions will help.
Your question has the answer . You write the code to generate the output and send mail in php. Now calling it on decided time period should be managed by cron, Its just a php page call on decided time which can be done by adding 1 line in crontab. Read following - http://www.thegeekstuff.com/2011/07/php-cron-job/

How can I display dual screens in PHP web applicatoin [closed]

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 a POS software developed in PHP and running as a web application.
I need to have dual monitors, one facing the employee with full details (sales screens showing heaps of options) and another monitor facing the customer with summarized information (ex. item, price list only)
How can that be achieved?
Many thanks
Because your dealing with the web, event driven development is not going to be possible. So to get around this, you will need to have two browser instances (1 per monitor) where the waitress side will need to do an ajax push on each update and the customer end will need to do some kind of ajax polling based on a timer. There is a lot of information all over the internet about how to accomplish this sort of thing. Take a look at Push notification to the client browser for some more discussion on the topic. There are some less supported methods you maybe able to leverage like realtime push notifications or multipart/x-mixed-replace MIME type or Comet or HTML5 Websockets.

how to implement a simple Android OAuth and server API [closed]

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 3 years ago.
Improve this question
i have an android app that sends data to my web server (data is processed by php and stored in mysql db). for security reasons, i need to verify that the user sending the data is who he/she says he/she is.
i do not want to verify login/password, i would rather use the phone's registered (account manager) google account with something like federated login. i played around with nick johnson's example for GAE, but it is specific for GAE based apps and does not permit integration with my own server API's, therefore authentication does not work (i get a google authToken, but it is meaningless for my server API).
from what i understand, the safest+simplest solution would be to use OAuth.
but i am completely stumped trying to understand OAuth (i understand its concepts, but have not been able to find any example that i could implement).
does anyone have anything like a functional example that i could play around with and tweak for my needs? thanx in advance!
when ever a user login or use your app first time , you should capture his/her device mac address, and store it to the database, and you can easily authenticate user using this mac address

Categories