Results 1 to 3 of 3
  1. #1
    Affiliate Manager bevmoam's Avatar
    Join Date
    January 18th, 2005
    Location
    Fresno/CA
    Posts
    273
    We need some help from a Perl Programmer.

    We have a Script in VB which we would like to have in PERL as well.

    Here is the code:

    Dim sFullURL,objSrvHTTP,sText,sResultFilename,oFso,oFile,iFoundFirst,iFoundLast,sResult,a

    sFullURL = "PROVIDED DATAFEED URL"
    sResultFilename = "c:\filename.csv"

    'USE Microsoft XMLHTTP to get the Data
    Set objSrvHTTP = CreateObject("msxml2.XMLHTTP")
    objSrvHTTP.open "POST", sFullURL, False
    objSrvHTTP.send ""
    sText = objSrvHTTP.responseText
    Set objSrvHTTP = Nothing

    'Create Array based on received Data
    sResult = Split(sText,vbcrlf)

    'Delete (old) target file on local Hard drive
    Set oFso = CreateObject("Scripting.FilesystemObject")
    if oFso.Fileexists(sResultFilename) then
    oFso.DeleteFile sResultFilename
    end if

    'Loop through Data Array and write into target file
    Set oFile = oFso.CreateTextFile(sResultFilename,true,false)
    for a = 0 to ubound(sResult)-1
    On Error Resume Next
    oFile.Writeline(sResult(a))
    On Error Goto 0
    next
    oFile.Close
    Set oFile = Nothing
    Set oFso = Nothing

    What it's doing is to grap the content from a dynamic ASP Page and writes it into a local file.

    Your help would be appreciated.

    Thanks.

    CC

    ___________________________
    Bevmo.com Affiliate Manager
    5%-10% Commission, 60 day cookie, 2 AM's
    http://www.bevmo.com
    http://www.bevmoaffiliates.com

  2. #2
    Member
    Join Date
    January 18th, 2005
    Posts
    87
    I can do it.

    g


    There are only 10 kinds of people that get binary, those that do and those that don't.

  3. #3
    Affiliate Manager bevmoam's Avatar
    Join Date
    January 18th, 2005
    Location
    Fresno/CA
    Posts
    273
    Thank you G.

    CC

    ___________________________
    Bevmo.com Affiliate Manager
    5%-10% Commission, 60 day cookie, 2 AM's
    http://www.bevmo.com
    http://www.bevmoaffiliates.com

  4. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Code Source
    By Chris - AMWSO in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: August 16th, 2007, 05:44 PM
  2. need some perl code...
    By SBTC in forum Programming / Datafeeds / Tools
    Replies: 14
    Last Post: July 30th, 2003, 06:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •