php - Is it possible to route cURL requests through a different server?

498

I'm doing development on my computer using WAMPServer but there is a service I use that whitelisted my live server's (Linux, CENTOS, Apache) IP address and so I need to make certain cURL requests go through my live server instead of being made directly from my computer. Is there any way to do this?

697

Answer

Solution:

The best thing to do is make part of your applications configurable. If you are calling your own web services, make those URLs configurable so that your production servers and development servers can each use separate URLs.

Another common way is to change ahosts file entry so that when connecting to a specific host name, you may override the network address of that host. I don't recommend this method though, as it is easy to forget what you have overridden, and what you haven't.

People are also looking for solutions to the problem: php - Inserting backslash into database

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.