Setting proxy in xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Setting proxy in xampp

Postby tillu » 13. October 2014 02:51

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
tillu
 
Posts: 1
Joined: 10. October 2014 16:22
Operating System: windows 8.1

Re: Setting proxy in xampp

Postby Nobbie » 13. October 2014 12:33

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-proxy


If 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
Nobbie
 
Posts: 8758
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 38 guests