Setting proxy in xampp
Posted:
13. October 2014 02:51
by tillu
Hi...I am using XAMPP 1.8.3 on windows...I have a web scrapper in php which used to work when I accessed Internet using a public IP...But now I am in college and behind an authenticated proxy server...Due to this the php code cannot load the webpage I am trying to access to scrap..Can somebody please tell me how to set proxy ip, port, username and password in xampp to let php have access to the webpage I trying to scrape..
Regards
Re: Setting proxy in xampp
Posted:
13. October 2014 12:33
by Nobbie
You have to edit the web scrape php script and implement some changes. There is no "general" Xampp Setup for that::
It depends, how you connect to the scraped URL. If you use cURL, you will find some examples how to establish a connect via Proxy:
http://stackoverflow.com/questions/5211 ... ia-a-proxyIf you use native fsockopen() function, you will find an example for accessing via a proxy in the user contributed notes of the documentation:
http://php.net/manual/de/function.fsockopen.php