IT Community - Software Programming, Web Development and Technical Support

Best Torrent Client

This is a discussion on Best Torrent Client within the Networking & Internet Connectivity forums, part of the Computer Hardware/Software and Networking category; I use a seperate PC for torrent downloads and I keep it always on and always downloading to it's ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Computer Hardware/Software and Networking > Networking & Internet Connectivity

Register FAQ Members List Calendar Mark Forums Read
  #31  
Old 09-10-2007, 05:36 AM
sans sans is offline
D-Web Programmer
 
Join Date: Apr 2007
Posts: 69
sans is on a distinguished road
Default Re: Best Torrent Client

I use a seperate PC for torrent downloads and I keep it always on and always
downloading to it's full bandwidth capacity to take the maximum out of my
unlimited connection. By this way I usually gets a monthly download of
atleast 80 GB. I use remote desktop from my office to monitor downloads at
this PC at my home. But the problem is that I have a dynamic IP address connection. So I wont be able to connect to the remote desktop if the IP is changed... Is there any work around ?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #32  
Old 09-10-2007, 05:50 AM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 542
itbarota is on a distinguished road
Default Re: Best Torrent Client

Well there are several solution for the classic Dynamic IP issue.
One is that, you can use a third party utility like Ip Monitor.
But I couldnt find a single utility that is freeware...

I dont think spending money on these simple utilities is not fare.
If you are a bit familiar to programming, you can write a simple java program
that checks ur public IP address at a given interval of time (say, 5 mins),
then compares it with the previous IP and if changed, sends a mail to an ID you wish.

All sample code for getting Public IP, timers and sending mails are available very easily through google.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #33  
Old 09-10-2007, 06:03 AM
sans sans is offline
D-Web Programmer
 
Join Date: Apr 2007
Posts: 69
sans is on a distinguished road
Default Re: Best Torrent Client

Though I am not so familiar with programming, I think I will be able to do it in
c# as .NET environment is such a wonderful programming environment for
both beginners as well as experts. So it would be nice if I could get some
code for c# than Java.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #34  
Old 09-10-2007, 06:21 AM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 542
itbarota is on a distinguished road
Default Re: Best Torrent Client

Quote:
Originally Posted by sans View Post
Though I am not so familiar with programming, I think I will be able to do it in
c# as .NET environment is such a wonderful programming environment for
both beginners as well as experts. So it would be nice if I could get some
code for c# than Java.
Well I too personally prefer C# over Java in doing utility applications.

As you wish, here is the code to get the Public IP of your system...

Make this part working with a small form and a label on it that shows the IP address and keeps it updated in every 5 mins or something...

You can write the following code in a timer event which is set to a duration of 300000 milli second (5 mis)...

Code:
        private void timer1_Tick(object sender, EventArgs e)
        {
                label1.Text = getIP();
        }
Check whether it is working properly by reseting your DSL router.


The GetIP() fuction code is listed below...

Code:
        private string getIP()
        {
            try
            {

                WebRequest myRequest = WebRequest.Create("http://network-tools.com");

                using (WebResponse res = myRequest.GetResponse())
                {
                    using (Stream s = res.GetResponseStream())
                    using (StreamReader sr = new StreamReader(s, Encoding.UTF8))
                    {
                        string html = sr.ReadToEnd();
                        Regex regex = new Regex(@"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b");
                        string ipString = regex.Match(html).Value;
                        return ipString;
                    }
                }
            }
            catch (Exception ex)
            {
                return "Error";
            }
        }
This code uses a service from Traceroute, Ping, Domain Name Server (DNS) Lookup, WHOIS, and DNS Records Lookup to retrieve the IP address. Its there for a long time and never seen down.

Hopt this helps
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #35  
Old 09-11-2007, 04:32 AM
sans sans is offline
D-Web Programmer
 
Join Date: Apr 2007
Posts: 69
sans is on a distinguished road
Default Re: Best Torrent Client

Thanks for the code snippet....

I have played around a bit and developed a small form that displays the current Public IP address of the system.

The timer is set to 5 mins so, every 5 mins it checks for the IP.

Now i need a way to send the IP to my mail ID if the IP changes....

How do I do that ?

Code:
namespace test4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {

                label1.Text = getIP();

        }
      private string getIP()
        {
            try
            {

                WebRequest myRequest = WebRequest.Create("http://network-tools.com");

                using (WebResponse res = myRequest.GetResponse())
                {
                    using (Stream s = res.GetResponseStream())
                    using (StreamReader sr = new StreamReader(s, Encoding.UTF8))
                    {
                        string html = sr.ReadToEnd();
                        Regex regex = new Regex(@"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b");
                        string ipString = regex.Match(html).Value;
                        return ipString;

                    }
                }
            }
            catch (Exception ex)
            {

            }
        }
}
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #36  
Old 09-11-2007, 05:06 AM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 542
itbarota is on a distinguished road
Default Re: Best Torrent Client

Happy to hear that it worked for you...

I didn't expect you to do it in the first try as you said you are not much familiar with programming. Congrats....

As for sending mail, you need to have access to any mail account that provides smtp access. Hope you have one.

Once you have the server info, login info and content to be sent, it is just a matter of creating a SmtpClient object....
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #37  
Old 09-11-2007, 07:03 AM
sans sans is offline
D-Web Programmer
 
Join Date: Apr 2007
Posts: 69
sans is on a distinguished road
Default Re: Best Torrent Client

All credit goes to Microsoft Visual Studio .NET 's frindly environment....

That is the sole reason for my success in developing that part.

And about the email account...
Though I have my office ID that supports SMTP access, I would prefer
using GMAIL for this service...

Can u sent me a sample code that uses gmail for sending emails ?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #38  
Old 09-12-2007, 01:03 AM
theone theone is offline
D-Web Sr.Programmer
 
Join Date: Jun 2007
Posts: 129
theone is on a distinguished road
Default Re: Best Torrent Client

Hai

That codes helped me too...
Till now I was using a third party utility that kept nagging me
about registering....


Thanks folks...
Great and informative discussion going on...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #39  
Old 09-12-2007, 09:44 PM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 542
itbarota is on a distinguished road
Default Re: Best Torrent Client

Hi...


To send mail through gmail, you can use the folloing function...


Code:
       public void SendMail(String ip)
        {
            System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
            msg.To.Add("you@yahoo.com");
            msg.From = new MailAddress("you@gmail.com", "IP Changed!!!", System.Text.Encoding.UTF8);
            msg.Subject = ip; 
            msg.SubjectEncoding = System.Text.Encoding.UTF8;
            msg.Body = "Your System ip changed to :"+ip +" at " +label4.Text ;
            msg.BodyEncoding = System.Text.Encoding.UTF8;
            msg.IsBodyHtml = false;
            msg.Priority = MailPriority.High;

            SmtpClient client = new SmtpClient();
            client.Credentials = new System.Net.NetworkCredential("you@gmail.com","password");
            client.Host = "smtp.gmail.com";
            client.EnableSsl = true;
            object userState = msg;
            try
            {
                client.SendAsync(msg, userState);
            }
            catch (System.Net.Mail.SmtpException ex)
            {
            }
        }
Hope this helps you developing a complete solution for your problem....
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #40  
Old 09-12-2007, 09:48 PM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 542
itbarota is on a distinguished road
Default Re: Best Torrent Client

Oh...

I think I missed the part that sets the port.

you must add the line

client.Port = 587;
after you set
client.Host = "smtp.gmail.com";



This is necessary...

Anyway, I am posting the complete code again...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bit Torrent Tutorials bluesky Web Hosting Deals 9 08-17-2009 02:15 AM
how to use jsp page as a EJP client.? saravanan Java Server Pages (JSP) 0 03-19-2008 08:45 PM
winsock - client AND server kesuu Networking & Internet Connectivity 0 12-23-2007 11:37 PM
How can we find the client’s IP Address Using C# .Net Archer C# Programming 0 07-15-2007 11:11 PM
E-mail Client You Use ! Which One ? killerkev06 The Lounge 2 03-29-2007 07:23 AM


All times are GMT -7. The time now is 07:28 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0