|
-
March 16th, 2002, 05:17 PM
#1
Simple programm needed
I am in need of a program that opens a specified number of TCP/Ip winsockets and runs a cgi, or a php....dont know but i think i would need to submit a cookie with each winsock connection.
This wouldnt be too difficult if I had some programming skills. But i am powerless in the world of programming.
Any help would be appriciated....
It is better to be HATED for who you are, than LOVED for who you are NOT.
THC/IP Version 4.2
-
March 16th, 2002, 05:42 PM
#2
Hmm, you want to stress-test a web-application?
-
March 16th, 2002, 05:48 PM
#3
When you say you 'need to run a cgi or a php,' do you mean you want to read websites that are composed using cgi or php, or do you want to compose those websites yourself?
I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.
-
March 16th, 2002, 07:17 PM
#4
Take a cgi script.....copy to clip board...paste in address bar. Click go, and it will run that CGI.
I want to do this without opening my browser. and like 50 sockets at a time.
It is better to be HATED for who you are, than LOVED for who you are NOT.
THC/IP Version 4.2
-
March 16th, 2002, 07:35 PM
#5
Here is a solution for you: Put your cgi on a web-server that resides on one machine. Then start up WebLoad on another machine that is connected to the web-server. The WebLoad program will simulate users by using simple javascript created by a wizard. You say you want 50 simultanious users, well be prepared to run at least a dual-processor on the server. If the cgi's do much work, that is.
Hope this helps.
-
March 16th, 2002, 07:54 PM
#6
I think this would do the trick too. Save this in a file called TryUrl.java, compile it, and run it.
I'm no java expert - maybe someone can check my code?
Code:
import java.net.URL;
import java.io.InputStream;
public class TryUrl {
public static void main (String[] args) {
// this opens 6 threads, add more if desired...
new SimpleThread("Thread 1").start();
new SimpleThread("Thread 2").start();
new SimpleThread("Thread 3").start();
new SimpleThread("Thread 4").start();
new SimpleThread("Thread 5").start();
new SimpleThread("Thread 6").start();
}
}
class SimpleThread extends Thread {
URL inUrl;
InputStream stream;
public SimpleThread(String str) {
super(str);
}
public void run() {
try {
inUrl = new URL("http://www.yoursite.com/index.php?withsomevariable=thisvalue");
stream = inUrl.openStream();
System.out.println("DONE! " + getName());
} catch (Exception e) { System.out.println("ERROR! " + e); }
}
}
I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.
-
March 16th, 2002, 11:36 PM
#7
I need to take a programming class...thats all there is to it....
It is better to be HATED for who you are, than LOVED for who you are NOT.
THC/IP Version 4.2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|