Zero Configuration Network for Android App and PHP Server - php

How to make my android app to get my php server's IP address?
Example, android app sending broadcast message. Then my server listen that message and send the server's ip address to the android app.
Phone ----> Send broadcast message for requesting IP Address
Server <----- Receive the message
Server -----> Send the IP Address information to phone
Phone <---- Receive the information and save the server's IP Address. Finish
I found JmDNS but, my server is PHP not Java. Or, there is a trick or solution the do that job?

Related

Sendgrid: The Requester's IP Address is not whitelisted

We are using SendGrid to send emails in our CodeIgniter project. We have whitelisted our Server's IP and it's working fine.
Problem Statement:
Now we have implemented AWS Auto Scaling due to which it attach new server during run time and the IP of new server doesn’t match with the mentioned IP and it start giving mentioned error.
Is there any way that instead of IP we can register our domain on sendgrid?

Getting my web server to send an email on behalf of my mail server

So, I have a separate web server and mail server configured for the same domain (web.example.com & mail.example.com, each with different IPs). The reason I did this was so that I could use CloudFlare to deliver my web content while protecting my origin IP. I understand that my mail server's IP is exposed, this is alright for the time being.
The issue I am facing is that if an email originates from my web server (let's say for instance a user forgets their login details, and my web server triggers a recovery email to be sent)... this will expose my web server's origin IP in the headers of the email sent to the user.
What I need to be able to do, is either one of the following, I am also open to other suggestions:
1) Masquerade as the IP of web.example.com
2) Trigger an email to be sent from mail.example.com
Both servers have PostFix and Dovecot configured.
I am using PHP to trigger mails to be sent.

TCP/IP protocall, Android, PHP sending to and reciving from server

I want to send a message to a PHP script on a server from one android device using HttpURLConnection and have the PHP script send the message to a second phone using file.getContents().
When a phone connects with the server is it possible to leave the phone waiting for a response by not echoing a response?
Can I then later use the same connection to respond to the device by executing file.getContents() and passing in the IP address of the device that had initially connected?
Thanks!

how to specify port number with ip for registering server for gcm

Hi i am trying to register my server ip for gcm notification.
My test server url was
http://xxx.xxx.x.xxx/mHealth_new/
and it was working fine...than i changed ip to live which is
http://xxx.xx.xxx.xx:8086/mhealth_app/
but i cant configure this url with port 8086 it gives me error
please help me....
In "Accept requests from these server IP addresses" section, you should fill the IP address of your current server, which is xxx.xx.xxx.xx. 8086 is the port number you use to access your server using http, not the port number used when your server sends the request to gcm server. The port that is used to send the request to gcm server is randomly assigned by the operating system.

Sending commands to an IP phone on the network using PHP

I have a number of phones on my network and I would like to be able to send a number to one based on extension for it to dial.
I have looked into TAPI and the PHP COM events but I don't understand it all that well and how to apply it to my setup.
Does anyone have any experience with using PHP to send commands to an IP phone on their network?
If these are Cisco IP Phones you can look at using the Ip Phone Services API: http://developer.cisco.com/web/ipps
Look specifically at "Dial" Telephony URI in the Application Development Notes
Each IP phone has a web server on it, you can use standard http(s) posts to send XML commands to the phone. You can completely control the phone in this manner.
You have to understand that client-server communication is a bit unidirectional. From iPhone to server you can easily send messages (and get responses), but to send a message from server to iPhone you have to implement socket connection between them, so the iPhone will always "listen" to what the server is "saying". Also, push notifications are a way to send messages from server to device, but it's not your case, I guess.

Categories