How is this code?

Well I just finished a small program that views a link as many times as you want, each time using a different proxy from a file proxies.txt. My next step is to get a referrer to work, so it redirects from a different site then to the site you want. Still trying to get that to work. In the meantime, what do you think of this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <iostream>
#include <windows.h>
#include <string>
#include <sstream>
#include <fstream>

using namespace std;

int main(){
string getcontent;
//string getcontentb; use later to impliment refferer url
int howmany = -1;
int howlong = 30000;
string link = "http://google.com/";
LPCSTR linkl = "http://google.com/";
LPCSTR locationA;
string locationS;
int q = 0;
//int w = 0;  use later to impliment refferer url

cout << "___-Link Viewer V1.0 - thesuperphreak@gmail.com-___" << endl << endl << endl;
cout << "What link do you want to visit?" << endl;
cin >> link;
cout << "How many times do you want to visit link?" << endl;
cin >> howmany;
cout << "How long should it pause between views? (in seconds)" << endl;
cin >> howlong;
howlong = howlong * 1000;

string ip[5000];
//string refurl[5000];  also to be used for ref

ifstream openfile ("proxies.txt");
    if(openfile.is_open())
    {
    while(! openfile.eof())
    {
    openfile >> getcontent;
    ip[q] = getcontent;
    q++;
    }}

//ifstream openfileb ("sitelist.txt");    BETWEEN
//    if(openfileb.is_open())
//    {
//    while(! openfileb.eof())
//    {
//    openfileb >> getcontentb;
//    refurl[w] = getcontentb;
//    cout << refurl[w] << endl;
//    w++;
//    }}

linkl = link.c_str();

for(int x = 0; x <= howmany; x++){
locationS = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe --proxy-server=" + ip[x];
locationA = locationS.c_str();
WinExec(locationA,0);
ShellExecute(NULL, "open", linkl, NULL, NULL, SW_SHOWNORMAL);
Sleep(howlong);
system("taskkill /f /im chrome.exe");
cout << endl << x+1 << ":  " << ip[x] << endl << endl;
}
}
Topic archived. No new replies allowed.