Php script for fcm - php

I am developing an android app implementing FCM. For testing purpose I need to implement my own script to send data.I am using linux and I am quite naive about server side implementation. I have a php script which is supposed to send data.It is on localhost.So what do I need to do to run the script. Do I need to bind my localhost to my IP .?? Also how do I know if my script has successfully send data.Right now I am not getting any error. I am using command line php -f var/www/html/filename. Thanks

Related

ios push notification web server on 2mhost.com

I am trying to use push notification on my app, I followed the tutorial.When I try the command php pushMe.php (this is my php file to send notification) on terminator, it works. My iphone got the message.But when I move my file to web server (2mhost.com) it does not work.
Can somebody tell me Why.
By the way,the socket and openssl are enabled on the server.

Laravel send SSH command

I'm working on a Laravel app and would need to send a SSH command to a remote server from my webapp. I know envoy can be used to this but this is not a good solution for me as envoy allows only to send a predefined command to a predefined list of servers.
In my case, I need to send a SSH command to a remote server when clicking on a button in my webapp to the IP address of a remote server that can be found on a label in the webapp.
Any suggestions?
I think it is always a good idea to stick to the language standard library if it provides the functionality you need. Please have a look at: http://php.net/manual/en/function.ssh2-exec.php

Using REST client through a webpage

I want to get information from ElasticSearch on port 9200 in localhost via REST API and PHP. I have tried both cURL and REST client (HTTPFUL). When I run my PHP script in command line like this:
php searcher.php
php-cgi searcher.php
every thing works fine and get expected response. But when I do this through a web page, I get "Unable to connect " Error on REST client and nothing on cURL.
What is the problem?
By the way, I am using Apache on linux, manually configured besides PHP.
Please help me. Thanks.

Web service PHP + Android application

Using eclipse i create a simple abdroid application which communicate with MYSQL data base using PHP scripts, i start writing my PHP Web Service and i put those files under 'www' of my Wamp server.
in fact Wamp server is using two servers
1.web server ( Apache)
2.Mysql
after doing those steps i run my android application under eclipse ide and i get all things works..
I m trying to understand the process behind all that.
My Android application by runnig send an HTTP request to the PHP web service, then ,the apache Web server in Wamp Server executes the php script and do some oparation on the data base ,after that the result is reterning to the Android application ( the result in Json format), and finaly the application decode the Json object and display the result
is it right? please correcte me if i m wrong
This is correct if you want it to be a simple request-driven web service (such as HTTP in your case).

Test whether SOAP is running properly

Programatically, I want to test whether SOAP is working fine on my clients machine.
The machine can be windows/linux.
I want to get the SOAP version as well.
I'm using PHP.
Similarly, I want to do it for WS02/WSF.
Thanks.
Set up a SOAP server and run a test script against it. If the test script works, SOAP on the client works.

Categories