* * *

Author Topic: Internet Tools  (Read 33461 times)

RomanMoz

  • Newbie
  • Posts: 3
Re: Internet Tools, now with more http
« Reply #60 on: August 23, 2017, 03:16:47 pm »
Thank you!

But really I don't know how to implement this into pascal code  :(

avra

  • Hero Member
  • *****
  • Posts: 1150
    • Additional info
Re: Internet Tools, now with more http
« Reply #61 on: August 24, 2017, 10:09:44 am »
Docs and Wiki show json parsing. Forum also shows a lot after entering 'json array' into search.
http://wiki.lazarus.freepascal.org/fcl-json
http://lazplanet.blogspot.rs/2014/09/a-simple-json-parsing-example.html
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

BeniBela

  • Hero Member
  • *****
  • Posts: 594
    • homepage
Re: Internet Tools, now with more http
« Reply #62 on: August 24, 2017, 02:48:55 pm »
Thank you!

But really I don't know how to implement this into pascal code  :(

That xidelcgi page is pretty much the same as  process function in simpleinternet.

Code: [Select]
process(input, query).toJoinedString
for .. in .. to iterate over the values

RomanMoz

  • Newbie
  • Posts: 3
Re: Internet Tools
« Reply #63 on: August 24, 2017, 10:21:12 pm »
Thanks a lot!

Now it solved...

ArtLogi

  • Full Member
  • ***
  • Posts: 132
Re: Internet Tools
« Reply #64 on: September 30, 2017, 01:55:18 am »
Hmm... I'm trying to get this working with Laz 1.6 and FPC3.0.0.0 on/to Win7, I downloaded the Internettools.zip from homepage and have been trying to include the package to my project all imaginable ways, but it seems always throw some errors while building the package itself.

....Those red IF_DEF swamps at the beginning of every .pas mainly seems to throw red.

If I try to compile example 1 from: http://www.benibela.de/documentation/internettools/
Code: Pascal  [Select]
  1. program TEST;
  2.        uses xquery;
  3.  
  4. begin
  5.   writeln(query('doc("http://example.org")//title').toString);
  6. end.  
Which all files from ZIP I should include to the same folder as the program TEST.pas is.  xquery.pas and... simpleinternet.pas and ... ... ..

..Or is there a "quaranteed" stable version, the funtionality I need is almost 7-bit ASCII web scrabing of few tens of lines per a day. What I understood these IFDEFs are mainly for UTF-8 quirks??
« Last Edit: September 30, 2017, 02:23:15 am by ArtLogi »

BeniBela

  • Hero Member
  • *****
  • Posts: 594
    • homepage
Re: Internet Tools
« Reply #65 on: October 04, 2017, 08:00:19 pm »
Hmm... I'm trying to get this working with Laz 1.6 and FPC3.0.0.0 on/to Win7, I downloaded the Internettools.zip from homepage and have been trying to include the package to my project all imaginable ways, but it seems always throw some errors while building the package itself.

....Those red IF_DEF swamps at the beginning of every .pas mainly seems to throw red.

What kind of errors?

Which all files from ZIP I should include to the same folder as the program TEST.pas is.  xquery.pas and... simpleinternet.pas and ... ... ..

Pretty much everything from the data and internet subdirectory. And the FLRE files, unless you disable that ifdef

..Or is there a "quaranteed" stable version, the funtionality I need is almost 7-bit ASCII web scrabing of few tens of lines per a day. What I understood these IFDEFs are mainly for UTF-8 quirks??

The zip file should be stable.

The ifdefs are mostly for backward compatibility, because I used different utf8/regex libraries. 

For fpc 3 I am merging the utf8 and non-utf8 packages, so that there will only be one version

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus