How to grab a https page with cURL/libcURL

Just starting out? Need help? Post your questions and find answers here.
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Re: How to grab a https page with cURL/libcURL

Post by Falko »

Hi,

no problem. Your code is very helpfull for me.
Thank you for sharing.

I've changed for me two Result$ to Messagerequester()-Outputs. :wink: :idea:
If everything is correct, I get an AppID.
Otherwise, I get an error in plain text.

Code: Select all

  
...
Result$ = Mid(Answer\Content$, Pos, FindString(Answer\Content$, ",", Pos) - Pos)
              EndIf
            Else
              ;Result$ = Str(Answer\Status)
              MessageRequester("Achtung",Answer\Content$);       Changed for Erroroutput 
            EndIf
          Else
            ;Result$ = Str(Answer\Status)
             MessageRequester("Achtung",Answer\Content$);        Changed for Erroroutput 
          EndIf
...
So can any user test this for Error-Output from PhoneGap.com

Code: Select all

Debug PhoneGap("","","",0); None Password and none Username
PhoneGap wrote:---------------------------
Achtung
---------------------------
{"error":"You need to sign in or sign up before continuing."}
---------------------------
OK
---------------------------
www.falko-pure.de
Win11 Pro 64-Bit, PB_6.11b1
SeregaZ
Enthusiast
Enthusiast
Posts: 628
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: How to grab a https page with cURL/libcURL

Post by SeregaZ »

this https autorization and grab will work with certificate autorization? not login and password, but by select certificate in certificate selector window.
User avatar
Derren
Enthusiast
Enthusiast
Posts: 316
Joined: Sat Jul 23, 2011 1:13 am
Location: Germany

Re: How to grab a https page with cURL/libcURL

Post by Derren »

infratec wrote:Hi,

without curl:

Code: Select all

;.... lots of code
Debug HttpReceive(url$)
Bernd

Hi infratec :D

Thanks a TON for this code.
After trying the PB HTTP-Library for ages and not being able to find a working cUrl binary, I stumbled upon your code.
This is gold!
After ironing out a kink with PB's new "everything is unicode" and the function HttpSendRequest_(), so far it does everything I want (doing some REST stuff) 8) :D :D :D
infratec
Always Here
Always Here
Posts: 7582
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to grab a https page with cURL/libcURL

Post by infratec »

You don't need to find a cUrl binary. It is 'inbuild'.

You can use libcurl.pbi to have full access to it.

But there are always more then one way ...
Post Reply