Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How detect internet connection?
I have a local network, connected to the Internet via a router (sharing
connection). The internet connection is turned on/off as needed by any of
the computers. This works well, exept for one thing - too often a user shuts
down the internet connection, thereby putting a stick in the wheel for other
users.
Is there a way to detect that another user in the local network is connected
outwards?
Any other idea?

 ========================================
======
Erik Kullberg
Address:          Enhagsvägen 2
S-589 43 Linköping
Sweden
Tel home:         +46 (0)13 21 94 35
Tel mobile:       +46 733 56 19 56
E-mail:              erik.kullberg@telia.com
My place:         N 58 deg, 23.115'  - E 015 deg, 42.137'



Report this thread to moderator Post Follow-up to this message
Old Post
Erik Kullberg
09-27-04 08:55 AM


Re: How detect internet connection?
Erik Kullberg spilled the following:

> I have a local network, connected to the Internet via a router (sharing
> connection). The internet connection is turned on/off as needed by any of
> the computers. This works well, exept for one thing - too often a user
> shuts down the internet connection, thereby putting a stick in the wheel
> for other users.
> Is there a way to detect that another user in the local network is
> connected outwards?
> Any other idea?
>

Only for stateful protocols.

Assuming you're using Linux, there are lots of tools managing connections
transparently - e.g. diald, smpppd.

If you want to be able to monitor activity from an application the easiest
way might be to periodically run ifconfig and look at the bytes
sent/received for the interface you're interested in.

If you're using Microsoft...?

HTH

C.

Report this thread to moderator Post Follow-up to this message
Old Post
Colin McKinnon
09-27-04 08:57 PM


Re: How detect internet connection?
I forgot to tell that I use Windows XP, sp2.
I read between your lines that this is not an advantage in this matter ... ?

/ Erik


"Colin McKinnon"
<colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> skrev i
meddelandet news:AeX5d.203$7a5.187@newsfe1-gui.ntli.net...
> Erik Kullberg spilled the following:
> 
>
> Only for stateful protocols.
>
> Assuming you're using Linux, there are lots of tools managing connections
> transparently - e.g. diald, smpppd.
>
> If you want to be able to monitor activity from an application the easiest
> way might be to periodically run ifconfig and look at the bytes
> sent/received for the interface you're interested in.
>
> If you're using Microsoft...?
>
> HTH
>
> C.



Report this thread to moderator Post Follow-up to this message
Old Post
Erik Kullberg
09-28-04 01:56 AM


Re: How detect internet connection?
Something silly which has nothing to do with php (since I am far from being
a gourou) but can't you try in your script to connect to a ressource
available from the web to find out if you have access or not ?

... for what it's worth ...

S.

"Erik Kullberg" <erik.kullberg@telia.com> a écrit dans le message de
news:yL%5d.104447$dP1.381050@newsc.telia.net...
> I forgot to tell that I use Windows XP, sp2.
> I read between your lines that this is not an advantage in this matter ...
?
>
> / Erik
>
>
> "Colin McKinnon"
> <colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> skrev i
> meddelandet news:AeX5d.203$7a5.187@newsfe1-gui.ntli.net... 
of 
wheel 
connections 
easiest 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Serge911
09-28-04 09:00 PM


Re: How detect internet connection?
The trouble is not to find out whether there is an internet connection or
not, but to know if any of
the others on the intranet is using it or not! If nobody but me is using it,
then I can disconnect, otherwise I should not.

/ Erik


"Serge911" <serge911@free.fr> skrev i meddelandet
news:41598618$0$1497$636a15ce@news.free.fr...
> Something silly which has nothing to do with php (since I am far from
> being
> a gourou) but can't you try in your script to connect to a ressource
> available from the web to find out if you have access or not ?
>
> ... for what it's worth ...
>
> S.
>
> "Erik Kullberg" <erik.kullberg@telia.com> a écrit dans le message de
> news:yL%5d.104447$dP1.381050@newsc.telia.net... 
> ? 
> of 
> wheel 
> connections 
> easiest 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Erik Kullberg
09-29-04 09:57 AM


Re: How detect internet connection?
Which XP?

I'm pretty sure with XP Professional you can set one machine to be the
router and have that make the connection whenever anyone wants access to the
internet, it doesn't connect if its the local or non-routable IP.

This would take the connection control away from individual users. You could
set the router machine to disconnect after a period of inactivity.

Also I see you've included your whole real email address in your post.
Generally this is to be avoided unless you are a spam fan.

HTH
Chris


"Erik Kullberg" <erik.kullberg@telia.com> wrote in message
news:yL%5d.104447$dP1.381050@newsc.telia.net...
> I forgot to tell that I use Windows XP, sp2.
> I read between your lines that this is not an advantage in this matter ...
?
>
> / Erik
>
>
> "Colin McKinnon"
> <colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> skrev i
> meddelandet news:AeX5d.203$7a5.187@newsfe1-gui.ntli.net... 
of 
wheel 
connections 
easiest 
>
>




Report this thread to moderator Post Follow-up to this message
Old Post
Chris Allen
09-30-04 01:03 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:30 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.