Matigo 0 Light Poster

Hello
I want to make a GUI tool in python Tkinter that can check if the site is up or down, I did a quick search on google and i came up with the following code

import httplib
conn = httplib.HTTPConnection("www.google.com")
conn.request("HEAD", "/")
r1 = conn.getresponse()
print r1.status, r1.reason

I'm happy with it, But when i test it on a site that i know it's down, I don't get any responds at all, It stays there waiting and waiting for the site to be up before it returns to me with 200 OK, But when test it on a site that i know it up and running, I get this (200 OK)

1) How can i make it check the site for like 7 Seconds, If no responds then make it says something like "Down!"

2) Make it keep checking the site every 7 seconds

3) Have it as a GUI with a textbox where to put the URL + a Label for the status + a Button to press to start checking

that will be really helpful from you guys thanks in advance

Matigo 0 Light Poster

Hello everyone
I'm building my first app using Python TkInter and i would like to have someone help me with this
I want to make a checkbox by default it should be False (Unchecked)
And make it do something like (Sorry i only know how to do it on visual basic) but just to get the idea

If checkbox1.checked = True then
form.height = 600
form.weight = 400
else
form.height = 500
form.weight = 40

Something like that
thanks in advance

Matigo 0 Light Poster

Hello everyone
How can i make the button be on the left side or right side please
Part of the code

Button(self, text = "start", command = self.launch).grid(row = 7, column = 0, columnspan = 1,)

Thanks in advance

Matigo 0 Light Poster

Full details about my computer Here

Matigo 0 Light Poster

Any body can help ?? :(:(

Matigo 0 Light Poster

Hello rubberman, Thanks for your responds
Here is the lspci output as you may already know, It's a huge list :D
I really need help, Because i removed the Windows 8 because i thought it will work straight away as the one i put on my laptop

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    Subsystem: Hewlett-Packard Company Device 2ada
    Flags: bus master, fast devsel, latency 0
    Capabilities: [e0] Vendor Specific Information <?>
    Kernel driver in use: agpgart-intel

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
    Flags: bus master, fast devsel, latency 0
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    Capabilities: [88] Subsystem: Hewlett-Packard Company Device 2ada
    Capabilities: [80] Power Management version 3
    Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
    Capabilities: [a0] Express Root Port (Slot+), MSI 00
    Capabilities: [100] Virtual Channel <?>
    Capabilities: [140] Root Complex Link <?>
    Kernel driver in use: pcieport
    Kernel modules: shpchp

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    Subsystem: Hewlett-Packard Company Device 2ada
    Flags: bus master, fast devsel, latency 0, IRQ 11
    Memory at f7800000 (64-bit, non-prefetchable) [size=4M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at f000 [size=64]
    Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
    Capabilities: [d0] Power Management version 2
    Capabilities: [a4] PCIe advanced features <?>

00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
    Subsystem: Hewlett-Packard Company …
Matigo 0 Light Poster

This is my lspci if that will help

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)
00:1d.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation H61 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
02:00.0 USB Controller: Texas Instruments Device 8241 (rev 02)
03:00.0 Network controller: Ralink corp. Device 539b
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 07)

Matigo 0 Light Poster

Hello members
I've just installed backtrack5 R3 on HP Pavilion p6 Series which it originally came with Windows 8 start 64BIT, I no longer have the windows 8
The problem that i'm atually facing is i cannot connect to the internet using wireless
I have done some research but with no luck then i decided to come to here
When i try to connect to the internet by going to Applications>>Internet>>Wicd Network Manager, All i get is "No wireless netwoks found.
I opened up command-line and typed "Ifconfig" or "ifconfig -a"I only get eth0 and lo
I tried to do "Ifconfig wlan up" I get this error >>wlan0: ERROR while getting interface flags: No such device
I already have got linux 5 R3 running on my Acer 32BIT Laptop and it's working perfect
Since i installed Linux on it "wlan0" was already there i manager to connect to the internet and download the wireless manager including all the UPDATES
Any idea guys why i'm not able to connect to the internet?? please help
and thanks in advance :)

Matigo 0 Light Poster

Hi Reverend Jim, Thanks for your respond
I had a look at the Networx, But i actually wants something that i can add to my project in vb

Matigo 0 Light Poster

Hi @John.Knapp
I have used the code that you sent me on this web earlier >> http://shop.x22cheats.com/showthread.php?t=28246
I have used it on my application and i made it with the timmer to check the site status every 8 Seconds
it works good, But the trouble is Each time it start checking the site status, It freez the whole application for about 2 to 3 seconds, And i was wondering if there any way that i can make it run without freezing the application ?
Is there any way to use the site "Checksite.us instead of using downforeveryoneorjustme.com" ??
Thanks for your helps bro

Matigo 0 Light Poster

is any any chance to get it done in C or C++ or programming language that i can use on Windows ?
I have been looking for it and i couldn't find it at all :S

Matigo 0 Light Poster

Hello guys
Anybody could help me please to make the Windows estimated usage in visual basic 2010 "To show how many MB/GB of internet i have used"
I'm running windows 8 and this application will will be used on windows 8 Only
Thanks in advance guys and i hope to hear from you soon

Matigo 0 Light Poster

And how to do that please comppile the code for linux ?

Matigo 0 Light Poster

Hi tinstaafl, I did actually tried the codes you gave me in the (Post) link, But it didn't work, I will be really really pleased if you could make a project for me send it to me please if that won't waste your time or take a long time to get it done
I have atually looked every where, But i couldn't find the solution for it and i really need it
Thanks for all your replays and helps :)

Matigo 0 Light Poster

Ok, I'm aiming to develop an application in Visual basic or C# that will be having like a Textbox1 in the form1, And this application will be used as you are using the "backtrack5 Terminal-Command lne" and run it on Backtrack
the above coding that i posted is to add the windows CMD 'command' in your application, But that to be used on Windows only, It actually have got two textboxes, The inpout and the output
Now wanted to do the same as i did with the windows CMD, But with Backtrack terminal comman line built in it too so it can work on the backtrack
To run an .EXE file on backtrack, i have to use the MONO 2.10.8 for windows
I have tried to use the windows CMD on backtrack5, But it doesn't do the same job as the backtrack terminal command line
I apologise if im making it even more complicated, Because my english isn't good enough to explain it in a higher level as i'm actually new to programming
Thanks a lot :)

Matigo 0 Light Poster

Do you recommend any good tittle to help me find it please
Thanks for your time :)

Matigo 0 Light Poster

Something to do with for example 2 textboxes, One will be the input and the second one will be the output, What ever you will type in the input>> will come up on the output just like using the Terminal Command

Matigo 0 Light Poster

Thanks tinstaafl for your respond
I do have the C# too, But what i have seen/Understood from the "Post/Link" you added with your reply was kind of talking about windows, Im not actually good at programming, And if im mistaken, Please correct me, what i needed is like adding the Backtrack5 terminal into my application, So i can use the terminal just from my application
Please help because i couldn't find any sign/solution for it online :(
thanks again

Matigo 0 Light Poster

To be honest, I tried to find a tittle for this but i couldn't think of any
I'm creating an application using visual basic 2010 that i will be using/running on Backtrack 5 R3, I tried it and it works fine, But i needed to add a Terminal to the application, Instead of opening Terminal on backtrack, I want to have it built in my application
Any idea guys how to do that?
thanks :)
This is the code that i had to add windows Command "CMD", But this works with Windows ONLY
>
>
>

ublic Class Form1
    Private WithEvents MyProcess As Process
    Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Width = 488
        Me.AcceptButton = Button1
        MyProcess = New Process
        With MyProcess.StartInfo
            .FileName = "CMD.EXE"
            .UseShellExecute = False
            .CreateNoWindow = True
            .RedirectStandardInput = True
            .RedirectStandardOutput = True
            .RedirectStandardError = True
        End With
        MyProcess.Start()
        MyProcess.BeginErrorReadLine()      'start async read on stderr
        MyProcess.BeginOutputReadLine()     'start async read on stdout
        AppendOutputText("Process Started at: " & MyProcess.StartTime.ToString)
    End Sub
    Private Sub MyProcess_ErrorDataReceived(ByVal sender As Object, ByVal e As System.Diagnostics.DataReceivedEventArgs) Handles MyProcess.ErrorDataReceived
        AppendOutputText(vbCrLf & "Error: " & e.Data)
    End Sub

    Private Sub MyProcess_OutputDataReceived(ByVal sender As Object, ByVal e As System.Diagnostics.DataReceivedEventArgs) Handles MyProcess.OutputDataReceived
        AppendOutputText(vbCrLf & e.Data)
    End Sub

    Private Sub AppendOutputText(ByVal text As String)
        If OutputTextBox.InvokeRequired Then
            Dim myDelegate As New AppendOutputTextDelegate(AddressOf AppendOutputText)
            Me.Invoke(myDelegate, text)
        Else
            OutputTextBox.AppendText(text)
        End If
    End Sub
    'button1 coding
    Private Sub Button1_Click(ByVal sender As …
Matigo 0 Light Poster

Thanks John

Matigo 0 Light Poster

Thanks John, This is excatly what i was actually looking for a long time
I did take the codes and put them in my project, Problem is, When i run my application and check the web Status at the same time, It blocks everything for about 10/25 seconds Depend, Just as an extra help if you could, Is there any way to make it a little bit faster ?
If not then don't worry about
thanks again for your help.

Matigo 0 Light Poster

Hi John, thanks for your quick respond
There is only one website I will be using, it called downforeveryorjustme.com
Which I want to check the status of the website if its down or up
It's not a class project as its not a passing time project, it's just something that I'm aiming to use almost everyday, And I'm really looking forward to it
From the above link all what I need is just the result, each time you check the status of a website, if its up, it will say something like, it's only you www.domainname.com looks up from here
If its down its says just you, that all what I need
Thanks for your help

Matigo 0 Light Poster

Hello guys, I really need your help on this one, Please help me out with it
I'm using a webBrowser in my application "Visual Basic 2010", And what basically it will do, Once you open up the application, It will show you a URL, let's say for example Google.com by default | What i wanted to do is, To kind of show a specific part of the website only and hide the rest of it, Like for example like result or on google.com, Show the search bar and the search button, But not the I'm feeling lucky Button
Can't i use it from source ?
Or at less the header/Tittle of the website
I'm not actually good at programming and my english isn't good enought to explain it in an easy way
I apologise and thanks in advance

Matigo 0 Light Poster

Hi Begginnerdev, Thanks for your quick respong, Actually the code you sent me was good to be used too, But it's not what i was actually looking for
I have got an application that been created in Visual basic 2010, And it runs python file, If i want to run it on an other computer, I will need to install python first, Otherwise it wont work, So i was wondering if there a way to have like python installed inside the application, So if i run it on an other machine, I won't need to install python to make it work, Any idea ?

Matigo 0 Light Poster

Thanks

Matigo 0 Light Poster

Hello guys
I have got a little programme that been written in Python, I did connect it to an application been created in Visual Basic 2010, But to run the Python file, Of course you will need to install the Python software/Format to be able to run the python file, And i was actually wondering if there is a way that i can like for Example Have some sort of code or store Python inside An application that been created in Visual Basic Somewhere like in Database or or.., So if you run your application on an other Computer, You won't need to install Python all over again to run your Application, Do you think it is possible
By the way, I'm not actually sure if this is the right place or do i need to paste it in Python form side, Please let me know
And i would like to thanks everyone for your helps, Especially R-Jim, I always come to daniweb, Because i know that i do find helps from you guys thanks again.

Matigo 0 Light Poster

Thanks Jim, It really helped me
Sorry for the late reply as i been away thats why i didn't let you you know if it did work
Thanks as always

Matigo 0 Light Poster

Hello everyone
In my app i'm using the counter and timer, But im stuck with resetting the counter
My code is:

If Timer2.Enabled = True Then
            counter = counter + 1   
            Label1.Text = counter    
            If Label1.Text = "180" Then
                Timer2.Enabled = false
                    Timer3.Enabled  = true 
                End If
            End If
            End Sub

 If Timer3.Enabled =  true then
            counter = counter + 1
            Label2.Text = counter 
            If Label1.Text = "80" Then
            Timer3.Enabled = False
            end if

But the problem is: When the second counter starts, It does continue on the first counter after it's stops which is 180, But what i was aiming for is to second counter to start from 0
Any idea?
Thanks

Matigo 0 Light Poster

Thanks woooee
Where do you think I should post this or look for this ?
Thanks again

Matigo 0 Light Poster

Hello everyone
Is there any way to kill the python.exe in Task Managaer "On Windows" using visual basic
The Problem is that i do open more than 1 python file at the same, But on task manager it's hows me something like this
Python.exe
python.exe
python.exe
python.exe
I have got the code to kill any progress in the task manager using Visual basic, But It doesn't work with python, Because i can't tell which one i opened first or which one was the second or the last

Code:

Dim p() As System.Diagnostics.Process = Process.GetProcessesByName("python")
        If p.Length = 1 Then
            p(0).Kill()

any body could help me with this please?
Thanks :)

Matigo 0 Light Poster

How about these website that you can check the status on the web server such as Host-tracker.com / checksite.us or downforeveryoneorjustme.com, How do they manager to get that information from the web server? Because i'm really interested in learning about it
I have seen some tools that been developed by some people which i heard that they have used the C and C++ / GUI to get it done, But how, I have got no idea.
I know that this is a bit strange, But is it possible for example to use one of the above links in your application and get just the result only without having to check web server on a browser?

Matigo 0 Light Poster

I got it now, Thank you so much for taking time to explain it, Because i just couldn't understand each time i used to ping a server it used to give me different numbers
thanks again :)

Matigo 0 Light Poster

Thank you very vert much Reverend for your helps :)

Matigo 0 Light Poster

Hello Reverend Jim
As always, Thank you for your responds
I have tried what you just sent me, And i kind of like the idea of the application that it called "InternetMonitor (last good)"
But, "There is But" :P
I wanted something that it will check the status of the web server if it's up or down
As i said, I did like the idea of InternetMonitor (last good) because it shows you at what time it started/Up for/Total up
But when i put the URL to check if the site is up or down, it shows me
For Example:
Date + my current time stared www.daniweb.com
date + time was UP for 00:00:05
date + time was XHUB for 00:00:01
date + time was up for 00:00:32
date + time was XHUB for 00:00:01 and so on
I did test it on a website that for sure i know it's down,Because i checked it online using host-tracker.com , But that doesn't show if the site is down on your application you sent me
Any idea? Plus The "Total down" that you have on the down bar on right it doesn't do anything at all
I tried to get the project so i can look at the codes, But i only found the project for the internetMonitor The one with the HUB IP1 IP2
Please Help
thanks friend :)

Matigo 0 Light Poster

Thanks for your replies as always
But im sorry i didn't understand this line
dir d:\ & copy file1.txt file2.txt & del file1.txt

Matigo 0 Light Poster

Hello everyone
I'm creating an application in visual basic 2010, "I'm very new to this"
What i want to do now is to make a monitor to check the status of the website server (If it's up or down)
I know that i can just ping it using CMD"command" But i actually wants something more professional or at less better than just pinging the server
Something like a heartbeat web status or something like any of these graphic Click Here
Thank you so much guys for your helps all the time

Matigo 0 Light Poster

Hello Reverend jim
I have got some few more question if you could help me please
1) How can i remove this from the command>> Process Started at: 04/11/2012 00:11:50
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
2) is there any way to run multi CMD?
thanks for your help, And i hope to hear from you again thanks

Matigo 0 Light Poster

This works fine, But each time i ping the server, I get some numbers
When i ping the servers that i know is up, I get (0) message, That will make sense if the 0 means it's UP
But when i ping a server that i know is down, Each time i ping it i get different numbers, So these numbers could be means please ?
Thanks for your help :)

Matigo 0 Light Poster

Hello Doogledude123, Thanks for your time
Could you please do me one like you can type/paste the URL/Server IP Address in a textbox and then check it by clicking on a button
Thank you so much again for your help :)

Matigo 0 Light Poster

Doogledude123
Thanks for your reply, But i found it a bit diffecult to understand it, Because it doesn't say where you should put the code, or if you will need a textbox or a button or .. ? any idea ?

Matigo 0 Light Poster

Hello everyone
Anybody to help me with this please
How can make an app that will check the server/URL if it's Online/offline using visual basic 2010
I know that i can just ping it using the CMD but i want something that will be in the app i'm aiming to create
I'm happy with the basic codes, But i will be pleased if you could give me something that it works very well
Thank you so much for your helps as always i get them from this site
Thanks again

Matigo 0 Light Poster

Hello Reverend Jim
Thank you so much for your quick reply and help
That what exactly what i wanted it it's working fine , god bless you mate xxx

Matigo 0 Light Poster

Hello everyone
I've been searching for help for a long time and still can't find somebody to solve it for me :(, The problem is im not good at explaining it , But here is the problem
I'm creating an application in visual basic 2010, and i was aiming to use the The windows command "cmd" inside of the application that im creating in vb, For example, If i wanted to use the cmd on windows, i can go to start menu+search "cmd" and then start using it, But what i wanted it is instead of having to go to start menu........., i wanted to have in inside my application and i was wondering if any body could help me get that work, By the way, i'm not a pro programmer, But i can understand the basic of visual basic 2008/2010
If any body could help, please give a little bit of your time if could and help me figure it out
If you are not sure about what i meant for having cmd inside the vb app, Please let me know and i will try with all what i can to make it a little bit more clear
Thank you so much :)

Matigo 0 Light Poster

Hi there , Just about to finish the app but i was wondering if you could help me with this please
I'm using the managed Codes and what i want to do is , i want to make a window or an alarm appear for example 15 seconds before let's say it will shutdown
could you help me please ?
thanks