Web traffic script

Discussion in 'Software' started by PrivatePile, Jul 7, 2013.

  1. PrivatePile

    PrivatePile Private E-2

    Really simple problem I'm sure someone will fix quickly. I'm trying to create a script that will generate web traffic. I've gotten this so far and it works great, except it doesn't loop. Once its hit the bottom of the script, I want it to loop the webpages again, refreshing the pages from the server, not from browser cache. I tried including
    But it only reloads the last page, not the entire thing.

    Code:
    On Error Resume Next
    
    Set objExplorer = CreateObject("InternetExplorer.Application")
    
    objExplorer.Navigate "http://www.espn.com"   
    objExplorer.Visible = 1
    
    Wscript.Sleep 5000
    
    objExplorer.Navigate "http://www.facebook.com"   
    objExplorer.Visible = 1
    
    Wscript.Sleep 5000
    
    objExplorer.Navigate "http://www.msn.com"   
    objExplorer.Visible = 1
    
    Wscript.Sleep 5000
    
    objExplorer.Navigate "http://www.google.com"   
    objExplorer.Visible = 1
    
    Set objDoc = objExplorer.Document
    
    Do While True
        Wscript.Sleep 5000
        If Err <> 0 Then
            Wscript.Quit
        End If
    Loop
    Any help would be appreciated.
     
  2. PC-XT

    PC-XT Master Sergeant

    A common simple way to reload directly from the server, (bypassing any caches in browsers, proxies, and the like,) is to include a count or other unique key in the query for each request of that page. For example:
    Say you want to load http://example.com/index.php?page=4&itemsperpage=5
    Let's choose to name the trash parameter "trashtrafficid".
    http://example.com/index.php?page=4&itemsperpage=5&trashtrafficid=key

    http://example.com would become http://example.com/?trashtrafficid=key

    key should be different for each request of that page, and can contain any data other than "&" and characters not for use in a url. If the same key is repeated, even weeks later, it may load from a cache instead of the server.

    While this currently works on the majority of pages, it won't work on all of them. It's best for use on pages you make yourself, so you know it won't break anything, or if it does, you can fix it. ;)

    Note: If you reload a page too often from some servers, they may block you to save their bandwidth.
     
    Last edited: Jul 7, 2013

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds