I am using AWS and Curl to send a request to a web service that connects to port 8080, I have already consumed another web service that connects to different ports and I have no problem, but with this, when I send the request, it quickly rejects the connection and The errno 56 code returns.
Is there a limitation in Curl that blocks connections when sending to a site with this port?
The cURl error 56 can have different reasons like: Passing data to be uploaded in URL itself instead of POST request. Probably Proxy blocking the request to the server. In some cases, the server does not support particular request, like some servers support PUT/POST any one of them.
Related
As the title suggests, I'm wondering If it's technically possible for a PHP script to act as an SOCKS proxy. If not what are the technical limitations?
I have access to a paid hosting which provides me with executing PHP scripts and a domain name is connected to the host. (e.g. example.com).
Is there any SOCKS proxy written in PHP so I may upload it a directory at host (e.g. example.com/proxy) and configure a client (like Firefox) to connect via the proxy.
cURL and other extensions are supported.
I'm not yet sure about SSH access.
I have seen projects like php-proxy or glype but These are not things I need because they can be used only by browsing proxy's homepage. (They are web proxies, But I need a proxy server)
What you describe will not work. While PHP does have the ability to create a TCP server, a proxy server in particular must already be running and listening for connections before a client tries to connect to it, and hosting providers execute a PHP script only on an as-needed basis whenever a client requests the script via the HTTP/S protocol, running the script only for the duration of that request. For what you want, you need a dedicated server running your PHP application separate from a web server. You won't get that with a hosting provider.
Does a cURL packet travel through the end users PC (ie the client connecting to my webserver).
For example, if I use cURL to connect to "http://www.example.com/?username=admin&password=password", will the end user be able to see this with packet sniffing?
the cURL request is initiated from your web server, the client does not know about the requests occurrence.
Using "curl" on the server-side will not be sniffable by the user making the request.
On the other hand, if you're transferring anything sensitive, you should still be using encryption to prevent sniffing from any other third-party.
I need consume two services from two differente providers.
I need connect with one SOAP server (WSDL), this code works correctly, the server required use SSL, but the problem is, in the same application, we need connect against another server who uses VPN and XML over HTTP, how can make this works correctly.
How separate this two ways of connection
Configure your network properly. This is nothing that PHP can influence. All PHP can do is connect via the network to a target server using HTTP or HTTPS. So if the server can ping and connect to both services on the command line (try to download the WSDL or any other resource with wget or curl), it will work.
If not, you have to find out how the servers are to be called (domain names), which IP they have, if the domain name properly resolved to these IPs, and if that IP is actually reachable by network (using a VPN does not really make a difference, it simply is another network connection).
Unfortunately going into these network details is probably beyond the scope of an answer here.
I am using CURL along with a proxy provider to get data from certain website,
but when I try to make a request fiddler displays information only from the file using CURL and not from the proxy IP that actually makes the main request and brings the data.
How can I do to display what is being sent/received from the proxy request (proxy IP) in fiddler monitor? can I use fsockopen instead?
NOTE: As you may know a proxy is a mediator between the client and the server, in this case I am using CURL to retrieve information using a proxy provider as mentioned before, what I want to display in the Fiddler monitor is the request among the proxy and the requested website and not through the file using CURL which is already displayed.
Thank you.
You'd need access to the proxy server. e.g. given
you -> proxy -> site_you_want
you only have access to the you -> proxy connection, and cannot see what's happening on the proxy -> site_you_want link. That's a whole different machine and tcp connection, which you cannot access from where you're sitting.
I'm trying to capture outgoing SOAP (over HTTP) requests generated by one of my PHP scripts (being run on my localhost). I'm running MAMP and using the PHP NuSOAP library for sending the request, I filter to HTTP traffic in Wireshark but nothing shows up when I run the script (which is sending a SOAP request to an external server via HTTP). Any ideas?
Thanks