Action()
{
    int HttpRetCode=0;
 
    // Set redirection depth to 0
    web_set_option("MaxRedirectionDepth", "0", LAST);
 
    // Initial Location where we want to go
    lr_save_string("http://www.mercury.com", "Location");
 
    do
    {
        // Save new Redirection Info (Location: header)
        web_reg_save_param("Location",
                           "LB=Location: ",
                           "RB=\r\n",
                           "Ord=1",
                           "NotFound=Warning",
                           "Search=Headers",
                           LAST );
 
        // do any web call (This needs to be modified to suit your needs)
        web_url("my_req",
          "URL={Location}",
          LAST );
 
        // Get HTTP response Code
        HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
 
    } while ((HttpRetCode>=300) & (HttpRetCode<400));
 
    return 0;
}
$y=0; $c=100; $d=10; for($x=0; $x -lt 10; $x++) { $y++; $a=$y; $y=($y-1)+$c; $b=$y;  
bin\mdrv.exe -usr "script_name.usr" -waittime $d -rowsmin $a -rowsmax $b }
GoBack