Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-03-2009, 06:23 AM   PM User | #1
Leoxalo
New to the CF scene

 
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Leoxalo is an unknown quantity at this point
Question Comunicate With A Batch Script?

Hey,
As you can probably see this is my first post, so im not completly sure if i have posted this in the right place.

I am only a beginner when it comes to HTML and i am setting up my own network server.
I have decided i am going to make a homepage and it is going to be located on this server which is going to be used to perform multiple tasks.

On this homepage i wish to have several things:
(1) Links to my more popular pages (I dont need help with this)
(2) I need it to communicate with a batch script. (I definatly need help with this)
(3) I need it to communicate with Myspace. (Sounds pretty odd but i need help with this too)

I have a script that constantly pings a remote network (My work network, I need to watch what computers log on and off)
This script is written in batch. I am going to post it bellow just in case it helps:
@ECHO OFF

COLOR 5A



:NORMAL

if exist "LOGS" (

GOTO BEGIN

) else (

MKDIR LOGS

)



:BEGIN

CD LOGS

GOTO LEW

SET attempt=0



:LEW

CLS

SET /a attempt=%attempt%+1

ECHO.Attempt %attempt%

if "%attempt%"=="1" (

ECHO.Connection Status: Testing

) else (

ECHO.Connection Status: Disconnected

)

SET stt=%time%

PING www.google.com >nul

if errorlevel 1 (

GOTO LEW

) else (

GOTO CON

)



:CON

CLS

ECHO.Attempt %attempt%

ECHO.Connection Status: Connected

ECHO.CONECTION ESTABLISHED @ %stt% >>CONNECTION.LEO

GOTO LOOP



:LOOP

PING www.google.com >nul

if errorlevel 1 (

GOTO TER

) else (

GOTO LOOP

)



:TER

SET ent=%time%

ECHO.CONECTION TERMINATED @ %ent% >>CONNECTION.LEO

GOTO LEW

Google obviously isn't my network, but you get the general idea.
How can i make it print something Eg. Google Status [Connected]
On my webpage?
If nothing like this is possible in HTML or some other web-based-script would it be possible to echo a text document into the webpage? EG. <p/>"//leoxn/homepage/connection.txt"</P>

And another thing:
For all those familiar with myspace,
Would it be possible to print if a user is logged on onto my home page which is completly unknown to myspace?

Any help is much apreciated,
Leoxalo
Leoxalo is offline   Reply With Quote
Reply

Bookmarks

Tags
batch, communicate, html, java, myspace

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:11 AM.


Advertisement
Log in to turn off these ads.