but not with WebGadget() or IE?
For example this link:
https://familysearch.org/records/collec ... /waypoints
Code: Select all
IncludeFile "libcurl-res.pb"
IncludeFile "libcurl-inc.pb"
; Includes found here:
; http://www.purebasic.fr/english/viewtopic.php?f=12&t=49758
ProcedureC LibCurlWriteFunction(*ptr, Size.i, NMemB, *Stream)
Protected SizeProper.i = Size & 255
Protected NMemBProper.i = NMemB
Protected MyDataS.s
Shared ReceivedData.s
MyDataS = PeekS(*ptr, -1, #PB_UTF8):ShowMemoryViewer(*ptr, MemorySize(*ptr))
ReceivedData + MyDataS
ProcedureReturn SizeProper * NMemBProper
EndProcedure
Procedure.s LibCurlGetData()
Shared ReceivedData.s
Protected ReturnData.s
ReturnData.s = ReceivedData.s
ReceivedData.s = ""
ProcedureReturn ReturnData.s
EndProcedure
URL.s="https://familysearch.org/records/collection/1951790/waypoints"
curl = curl_easy_init()
If curl
Debug curl_easy_setopt(curl, #CURLOPT_URL, @URL)
Debug curl_easy_setopt(curl, #CURLOPT_SSL_VERIFYPEER, 0)
Debug curl_easy_setopt(curl, #CURLOPT_SSL_VERIFYHOST, 0)
Debug curl_easy_setopt(curl, #CURLOPT_HEADER, @"")
Debug curl_easy_setopt(curl, #CURLOPT_WRITEFUNCTION, @RW_LibCurl_WriteFunction())
res = curl_easy_perform(curl)
Debug res
Debug "----"
Debug LibCurlGetData()
Debug "----"
Debug curl_easy_cleanup(curl)
EndIf
What ist wrong/missing to show page content?Debug wrote:0
0
0
0
0
0
----
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Date: Sat, 22 Mar 2014 19:10:06 GMT
Connection: close
Access-Control-Allow-Methods: OPTIONS, HEAD, GET, PUT, POST, DELETE
Access-Control-Allow-Headers: accept, accept-charset, accept-encoding, accept-language, accept-datetime, authorization, connection, content-length, content-md5, content-type, date, expect, from, host, if-match, if-modified-since, if-none-match, if-range, if-unmodified-since, origin, range, referer, singularityjsheader, te, user-agent, warning, x-reason, x-requested-with, x-fs-feature-tag
Access-Control-Expose-Headers: location, link, warning, x-entity-id, content-location, x-processing-time, retry-after
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 604800
----
0
The page is also not shown with IE.
Browser used: FireFox 26 and IE 11.
I need a Windows only way to get the page content.
Any help appreciated.