Skip to content
Advertisement

Tag: proxy

PHP cURL Received HTTP code 407 from proxy after CONNECT

I have a php curl with proxy problem. Below is my code: The format of proxies in proxy.txt is ip:port:user:pass and all proxies are working. The problem is when I used $proxyipport and $proxyuserpwd in CURLOPT_PROXY and CURLOPT_USERPWD, the curl result threw the error Received HTTP code 407 from proxy after CONNECT. However, when I replaced those variables with actual

Check proxy before cURL

I need to check whether the selected $proxy is active or not and do a loop until a working one in proxy.txt is found before using it in a cURL. How could I do that? Below is a given proxy function. Thank you. Answer maybe you can ping, something like this

Use proxy to connect to a mysql db through PDO

I’m trying to connect to a remote mysql database with PHP PDO (php version 5.3) and I need it to go through a proxy. My connection looks like this right now. I’dd need it to go through a proxy, like http://proxy.mydomain.com:port I’ve searched through the PDO Doc and can’t seem to find anything on the subject. Is there a way

Sanitize user-supplied URL for file_get_contents

I want to use file_get_contents to implement a proxy so I can do cross domain AJAX requests. Query string will be used to supply the URL to file_get_contents. Now the problem is people can muck around with the query string in order to read local files on the server. I don’t want this. Can someone get me a function to

Detecting whether a user is behind a proxy

I’m trying to figure out how I could detect whether people logging into my site are behind a proxy or not. I’ve read that you can detect a person’s real IP address through embeddable objects (Flash and Java). However, I haven’t been able to actually find any examples or source for this. I’m using PHP and I’ve read that looking

Advertisement