Execute script from server to server php - php

I need to call one URL without the browser. I have tried with POSTMAN. its working fine. Not sure how to do it via Server to server in PHP ?
Is there any online service available for these kind of trigger. Tried cron job too but not working as expected. Any help??

Try this. Hope it will help. This is just the basic curl request.

Related

What to do with a 503 error message when using Ajax Post on LIVE server?

My app works fine on my local machine. I'm able to perform all Ajax calls perfectly. Tested thoroughly on several web browsers and everything works seamlessly on localhost. Problems are now happening on live server. While some Ajax calls work, the most important one which is register.php does not. Upon contacting my host, they told me they can't help me since it's outside their scope which is fine I'm on my own. But is a 503 not something they should handle? They told me the php.ini is read-only(shared hosting)... So does it mean I'm doom or what am I doing wrong here? Php is activated on livesite and I also have a live database(mariadb). I'm using phpmailer in the register.php script but they told me I was allowed to use it. Any help?
This is the error I receive in the console on live site :
Since it is a 503 server-side error I would try re-uploading the problem files since the other files seem to be working. Maybe some files got corrupted during transfer. Let us know if you solve it and what the problem was.

Restful php client not working on server but works fine in localhost

i need build a restful client on php. i have used pest class which is available on github. my client is working fine on localhost where the web service is hosted on a remote server. but when i uploaded the code to another server it returns timeout. I havent used any extension php (dll files). what can be the issue. please help me. thanx.
How does it execute it's web requests? (Sockets, file_get_contents, curl?) I'd imagine it's an issue of not allowing outbound requests. In that case, contact the server admin and ask them. Try using a demo curl script to see if you can contact google and pull down its index page, that will tell you if you are allowed out bound requests. I had this issue before, where my server was denied outbound requests and just had no results. I would think the server-admin would be able to help here.

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.

PHP iSDK is not working when deploy on Ubuntu cloud server

I have written some custom webservices to communicate with Infusionsoft. I want to fetch the Custom Field from Infusionsoft on the basis of EmailId.
I have used following SDK to fulfill my requirements: https://github.com/infusionsoft/PHP-iSDK
The issue is that when I test my code in my local machine it runs fine. My local machine contains Windows 7 and wamp server.
But when I deploy it on my cloud server that is based on Ubuntu. it doesnt work. I have already installed apache server on ubuntu..
I have put some debug points in isdk.php file within some functions.. These are the logs from them on each machine:
Local Machine - Windows 7:
In Find By Email Method
***In method caller***
Response From Call: Array
Custom field from Infusionsoft: 20130803T07:46:03
Cloud Server - Ubuntu:
In Find By Email Method
***In method caller***
Response From Call: 0
It seems it gets connected successfully to Infusionsoft but it doesnt return output properly. I have used same request parameters on both.
What I am missing here?? Is it something to do with xmlrpc?? I have placed the xmlrpc directory on ubuntu as well.. but it didnt worked out...
Any quick response would be appreciated.
Thanks
Zunair
Since you did not provide your version of PHP I can only tell you to check your PHP versions and make sure the ubuntu server is at least 5.3.
Print out your response you get from infusionsoft, it should be in the form of an array object and you might have a different message. Perhaps a throttling issue. It looks like the response you are printing out is just some variables you are echoing.
The last thing I can think of to check is the location of the ubuntu machine. If I recall correctly infusionsoft has some groups of IPs blocked from accessing the API. I doubt this is your issue but it is a possibility.
Thanks guys for your response.. I got it working..
The first issue was that infusionsofts logs were not working for me... I did fixed them first and they showed me what was the actual reason..
They were using curl for sending the requests.. In my local machine curl was installed and in ubuntu I didnt have it with me... So, I installed it there.. and then it came back to life.. :)

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