Link to home
Start Free TrialLog in
Avatar of nito8300
nito8300Flag for United States of America

asked on

Ping From ASP Page

Hello all
I need the ASP page to prompt for the parameter in a text box, then the user would type the IP Address click a button for submit. The results need to be return to the same page;

<<Please include all code>>

Thank you all,
Nito
Avatar of randeeps
randeeps

you can use the wscript shell command... you have to instantiate the object and then run the following command

ping 192.169.0.3 > c:\filename.txt

please note that your IUSR_Machinename acct has permissions to write file to the folder location i.e. in the example c:\filename.txt

after running the command the ouput of the ping is stored in the filename.txt and now using Scripting.FileSystemObject you can open the text file and then write the content to the user's browser and then delete the file from the system.

ASKER CERTIFIED SOLUTION
Avatar of rohanbairat3
rohanbairat3

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nito8300

ASKER

rohanbairatt3,
I tried the option at http://www.serverobjects.com/products.htm#free, it didn't work; it asked me to run this: regsvr32 aspping.dll  I did but now I can't delete the aspping.dll file - it tells me the file is in use.  Do you know how to get rid of it???

I also tried the third link - from DynuCOM - that seems to work - thanks.
Nevermind I got it.  I went to regedit and deleted the key.

http://www.dynu.com/dynuping.asp  - worked for me