Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9108635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:51:16+00:00 2026-06-17T02:51:16+00:00

sorry if my english is not good. I wanna write a program that can

  • 0

sorry if my english is not good.
I wanna write a program that can open the site every 15 seconds. But do it with a different IP. That means get a list of IP and every 15 seconds open a website. How did you do it? What module should I use? Thanks you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:51:17+00:00Added an answer on June 17, 2026 at 2:51 am

    If you’re asking how to make sure you fire off one connection every 15 seconds, even though it may take a few seconds (maybe even longer than 15) for each one, that’s easy. Since you’re only making one connection every 15 seconds, there’s really no reason not to just spawn a thread for each one.

    So:

    def connectToSiteFunction(ip):
        # your code to bind ip (if it's a source) or connect to it (if it's a dst) 
        # and do your thing here
    
    def connectAndWait():
        for ip in ips:
            t = threading.Thread(target=connectToSiteFunction, args=(ip,))
            yield t
            t.start()
            os.sleep(15)
    
    threads = [t for t in connectAndWait()]
    for t in threads:
        t.join()
    

    If you’re talking about destination IPs, and you want to know how to use a different one for each request… well, you usually just modify the URL. Something like this:

    def connectToSiteFunction(ip):
        url = 'http://{}/path/to/page.html'.format(ip)
        # now open url as normal
    

    If you’re asking how to bind a source address with your chosen URL-downloading library, you’d have to tell us which library, but: Either the library will have a parameter for it, or it will have a way for you to specify a socket factory, or it will be impossible (unless you want to monkeypatch socket.socket with your own factory). If it lets you specify a socket factory, the way to do it is this:

    def make_socket_factory(srcip):
        def socket_factory():
            s = socket.socket()
            s.bind((srcip, 0))
            return s
        return socket_factory
    

    Then just pass in make_socket_factory(srcip) as the factory.

    If you want to know how to download a URL in the first place… there are a lot of ways to do that, from the stdlib urllib2 to requests and pycurl to twisted, and there are already plenty of answers on SO (and elsewhere) comparing and contrasting them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, sorry for my English I'm not good at it but I
First of all, sorry, but my English is not very good. I'm at the
(Sorry I'm not good at English) I haved created a custom BaseAdapter to show
I'm not good in English. What wrong with my text ^^ sorry :) I
sorry for my English. I write bash-file, that uses variable: shared_var=/system/xbin My script-file: exec=./adb
First of all, I need to say that my English is not good. So
guys, sorry for the title of the post... i'm not so good in english,
first of all sorry for my English :-) not so good. I have a
Sorry, My English is not good, I have a View: <div class=editor-field id =
and sorry for my not really good english. I'll try my best :) I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.