soma56 Posted August 10, 2010 Share Posted August 10, 2010 I have a script that I've given the user some additional options to either get a random proxy from a URL or list that they have supplied. While getting from the URL is no problem. I banging my head against the wall trying to figure out why the program won't get a random proxy from the list. After submitting their query their proxy list gets written to a temporary file. Everything writes fine and the URL where they are written is the exact format that I need. This works: //Where the user submits a URL <?PHP $proxypage = file('theirproxyurl.php'); ?> Although the page exists in the exact same format as the above link when I write their proxies to a file within the server - it does not work. For example: //Where the user submits a list of proxies - they get written to a file <?PHP $proxypage = file('proxieswrittentofile.php'); ?> Even if I paste the LINK (Note: the page exists with the exact same format) directly in the program where the users proxies were written to it still doesn't work. <?PHP //This doesn't work: $proxypage = file('pasted-working-link-in-exact-same-format.php'); ?> <?PHP //I tried the full URL - it doesn't work either $proxypage = file('http://SUBDOMAIN.fullURLtowrittenproxypage.php'); ?> The only thing that's different is that the file where the proxies are being written is on a sub-domains. Aside from that the pages are absolutely identical down to the <br /> tags. Would sub-domains be an issue for the file function? Link to comment https://forums.phpfreaks.com/topic/210276-major-problem-trying-to-get-proxies-from-list/ Share on other sites More sharing options...
soma56 Posted August 10, 2010 Author Share Posted August 10, 2010 Looks like I'm getting closer. With some quick testing discovered the following: This worked: $proxypage = file('http://domain.com/proxypage.php'); This didn't work: $proxypage = file('http://subdomain.domain.com/proxypage.php'); Link to comment https://forums.phpfreaks.com/topic/210276-major-problem-trying-to-get-proxies-from-list/#findComment-1097319 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.