简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM