views:

37

answers:

2

hi, i have few websites on servers around the world that run a certein function and i want that the site will send the output directly to my computer (no neccessary my computer, it can be my other website that is located in my country, the important thing is that the data will arrive form the site to my location on the globe). thanks, yishai

+1  A: 

I suspect that "electronic mail", commonly called e-mail, is probably the best solution.

If you e-mail the output to yourself then you can access the results from anywhere in the globe, whether it's from your computer or from an Internet Cafe somewhere.

.net classes that should be useful are System.Net.Mail.SmtpClient and System.Net.Mail.MailMessage. Create a MailMessage and send it with the SmtpClient.

Cosmic Flame
hi, thanks for the answer. the problem with email (such as gmail - which is located in the us) is that the results doesn't get directly to me (i probably didn't explain myself in the question too well). in my project i need to check how much time does it take from staring the function until the result get into my computer/country, but i think there is a lead here, if i can find email that is located in israel, i'll check it. thanks
yishai
So what are you really trying to find out? How long the function takes to run? How long it takes for a webpage to travel from your server to your computer? Incidentally, for e-mail based in Israel you could always run a temporary mail server on your machine and send the message directly to it.
Cosmic Flame
i know how much time the function take to run, i have a timer inside the function which take timestamp in the beginning of the function and in the end of it. but i don't know how much time it takes for a reply to reach my computer. "temporary mail server" is created by the function you describe in the previous message (System.Net.Mail.SmtpClient and System.Net.Mail.MailMessage)? how do i create such mail? thanks again!
yishai
(System.Net.Mail.SmtpClient and System.Net.Mail.MailMessage) are used for sending a message from .NET. by "temporary mail server", I meant running an SMTP server on your machine.
Cosmic Flame
If I've understood correctly, you want to know how long it takes for the page to load on your computer. Have you tried Firebug's page load timer? http://www.kevinleary.net/testing-page-load-speed-with-firebug/
Cosmic Flame
no, i think that if i'll explain the entire process it will be more clear. i want to send page request to a server in the us, wait for the request to start the function and after the function is over, i want to get the result on my computer. now, the main goal here is to find out how much time the entire process takes, from the request sending until the result show up on my computer. i hope i explain myself...
yishai
BTW, i've tried to use websites who check the load time such as: http://www.webpagetest.org/ (not my site, but great one) but the result don't include the processing time in the function and some sites didn't work (i know that the time to process the request takes more then a minute and the site loaded in about 20 sec which in not reasonable).
yishai
I've posted a new answer that should hopefully explain how to do what you're trying to do.
Cosmic Flame
+1  A: 

i want to send page request to a server in the us, wait for the request to start the function and after the function is over, i want to get the result on my computer. now, the main goal here is to find out how much time the entire process takes, from the request sending until the result show up on my computer.

So, to break this down: You have a function on a web server in the US. You want to know how long it takes to request a page, the function to complete and then for the result to be returned to your computer.

My (new) advice is this:

  1. Create/modify a webpage on your site to output the results of your function and also the time it took to run the function.
  2. With Firebug running and the Net panel enabled (See this article) load your new webpage
  3. Firebug will tell you how long the request took to, from sending the inital GET to when the last byte of data was downloaded.
  4. The webpage will tell you how long the function took to run.
  5. From this you know a) how long the entire process took, b) how long the function took to complete, c) how much time was taken transfering data from the server to your machine and vice versa (firebug time - function time)

This should answer your question.

Cosmic Flame
nice one, thanks! i'll check it.
yishai
Glad I could help :)
Cosmic Flame