buraisu Posted October 20, 2006 Share Posted October 20, 2006 Hi there.Is it possible to connect to a site (lets say we are using fopen)but connect thorugh a proxy server.Can this be done all in php? Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/ Share on other sites More sharing options...
Daniel0 Posted October 20, 2006 Share Posted October 20, 2006 Just connect to the proxy instead. I don't know how proxies work, so I cannot specify it more detailed. Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-111696 Share on other sites More sharing options...
buraisu Posted October 20, 2006 Author Share Posted October 20, 2006 Well, this may sound lame, but if I can find a way to get my friends nexopia profile hitcount up by a certain amount I am oing to get 50$.I know that a hit is added for every different ip address that visits the page, once a day.So I am trying to make a script that will connect to different proxy servers in a databse and give the page a hit. Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-111762 Share on other sites More sharing options...
HuggieBear Posted October 20, 2006 Share Posted October 20, 2006 [quote author=buraisu link=topic=112089.msg454873#msg454873 date=1161340338]Well, this may sound lame, but if I can find a way to get my friends nexopia profile hitcount up by a certain amount I am oing to get 50$.[/quote]I don't think it's lame, I like someone who shows initiative when finding solutions.Many people who post here are trying to find solutions to code problems that they themselves are charging customers for. I'm also sure that they're charging a hell of a lot more than $50 ;DRegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-111765 Share on other sites More sharing options...
Daniel0 Posted October 20, 2006 Share Posted October 20, 2006 I am having a hard time believing that they allow the usage bots to get fake hits. Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-111766 Share on other sites More sharing options...
buraisu Posted October 20, 2006 Author Share Posted October 20, 2006 I can do it if I manually change my proxy settings no problem.but that is rather annoying.I am just connecting to the page with a different IP address, therefore they think I am a different browser.I just want to be able to automate this process with PHP. Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-111770 Share on other sites More sharing options...
buraisu Posted October 20, 2006 Author Share Posted October 20, 2006 Here is a better description of what I need to do.In a loop.Connect to proxy server pulled from a database,give the webpage a hitrepeate for other proxy servers.It shouldn't be a big task, unless it is a difficult process (if it is even possible) to do the proxy server stuff. Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-111775 Share on other sites More sharing options...
HuggieBear Posted October 20, 2006 Share Posted October 20, 2006 I think you're possibly going to need the [url=http://uk.php.net/manual/en/ref.curl.php]cURL[/url] library.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-111828 Share on other sites More sharing options...
buraisu Posted October 21, 2006 Author Share Posted October 21, 2006 I wrote this script using the curl information I read up on.but it doesnt really work.Is it becuase I am using the loop?can this even be done how I am trying to do it or must I do it another way?[code]<?phpinclude 'db.php';$query = 'SELECT url FROM proxies';$result = mysql_query($query);$ii = mysql_num_rows($result);$i=0;while ($i < $ii) { $prox = mysql_result($result,$i,"url"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://targeturl"); curl_setopt($ch, CURLOPT_PROXY, "$prox"); curl_exec($ch); curl_close($ch); $i++; } ?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/24513-connecting-to-proxy-servers/#findComment-112497 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.