blackandwhite

Properly send SSL requests to get(request) pages from txt file

2 posts in this topic

#1 ·  Posted (edited)

Hi people :D

here is pathlinks.txt file:

pathlink1
pathlink2
pathlink3
pathlink4
.
.
....etc

and part code is:

Func _GO()
    
    $aURL = FileReadToArray("pathlinks.txt")
    
    For $i = 0 To $aURL[1]
        $page = _WinHttpSimpleSSLRequest($Start, 'GET', '/path/' & $aURL[$i], Default, Default, Default, 1)
        FileWrite('page' & $aURL[$i] & '.html', $page[1])
        
        ;here
        ;some
        ;operations
        
    Next

EndFunc

or

Func _GO()
    
    $aURL = FileReadToArray("pathlinks.txt")
    
    For $i = 0 To UBound($aURL) - 1
        $page = _WinHttpSimpleSSLRequest($Start, 'GET', '/path/' & $aURL[$i], Default, Default, Default, 1)
        FileWrite('page' & $aURL[$i] & '.html', $page[1])
        
        ;here
        ;some
        ;operations
        
    Next

EndFunc

both of them wont get correctly path pages and writes zero(empty) data to files, what should I do?

using _WinHttpSimpleSSLRequest is important, because I''ll be already authorized on the website before saving pages

Edited by blackandwhite

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now