Thanks for the replies, everyone.
Cooo-kies, that's an interesting idea, actually. I'm going to look into that. I've done some initial research and it looks fairly simple to integrate. I will consider this heavily in the next few days and may consider posting an example of what I come up with. I'm working on another project at the moment, so time is a little tight right now, but I think you've found the right idea with the distributed computing.
madoctopus, that's fair and good. I'm curious how much of that you have actually implemented. Seeing as this is my full time job, my income is largely dependent on the work I actually produce, so while I have a list of things to implement, they'll actually eventually be done. Although I appreciate the support.
Lastly, I'll answer the questions you asked NTG98,
Wow. I started programming a bit about a year ago for SEO purposes. I have one question: how in the world are you able to code so quickly? It seems like it takes me forever to automate simple tasks online like google queries and wordpress POST requests. It took me several hours to figure out how to configure a proxy checker, and from the looks of it, it took you a few minutes!
Here's how it usually goes for me, do you have any tips? Maybe I'm going about this the wrong way...:
*spend an hour or so on BHW trying to find out where to get proxies (you mentioned 360!?!)
*then I try to figure out how to do a curl or wget request, which usually has problems with analyzing the data, so tack on another hour
*now where in the world do I find a proxy checker? I need to look for software that I can interface with, right? Or I'll just have to figure out how to make my own proxy checker, which takes a few hours to figure out what exactly it is that they're doing
*now I can finally code the proxy checking script, and guess what- more bugs, another hour
*finally I finish the code and it works pretty well, but it took forever to write
Programming takes a lot longer than it needs to typically due to flaws in logic and errors in planning. Planning how you're going to do repetitive tasks in an easy way. If you actually know what it is that you're trying to do, its just a matter of getting there. You may take a long time if you're vague about what it is you're trying to do.
So here's how I manage to get proxies:
- Go to google and search: +":8080″ +":3128″ +":80″
- In the search settings, select the last 24 hours.
- Write a simple script to visit google, and parse all the results
- Visit those websites
- Use a simple IP
ort
username
assword)? type regex and search the result of those websites
- Format the proxy and add it to a list
Since we have laid out what we want in order to get proxies, this is simple. Its also ideal to use in a program as a default scrape site since the proxies rotate every 24 hours.
Now you'll have about a thousand proxies in which you can test. In order to test proxies, you know you'll need a few things:
- Check the users external IP address
- You need a list of proxy judges. There are tons of public ones. Load the list and check the judges by visiting them without a proxy. Check to see if the users external IP is somewhere on the page. If it is, the judge is clearly working as intended.
- Load your proxies and cycle through them, visiting your judge. If the page loads, the proxy works. If your external IP is found anywhere in the returned results, the proxy is transparent. If it is found no where at all, it is anonymous. You can then check against the settings you defined to save this proxy or not
So now you know you need to lay your program out to do the following things in this order:
- Scrape Proxies
- Visit google's returned index, and scrape the results for links
- visit those pages, parse proxies and format them as webproxies
- Testing Proxies
- Check the users external IP
- Check the judge to make sure its working
- Connect to the judge with a proxy and see if your ip is there
- Save the results
This is a total of 6 functions and maybe two classes that need to be written. You can do this in about an hour if you just lay out exactly what it is you need. I can write things fast because I plan far ahead. I also spend a large portion of my time building classes which I can reuse in other programs. This makes development really quick. I've worked in programming for years and know the value a good library can bring to the table.
Thanks for the support
edit: the tl:dr version: Lots of flow charts.