Can you tell me how can I make a program that automatically downloads an XML of an URL and takes it's titles, ddescription etc.. If you can recommend me a good API or library, please give me and a link to tutorials how to use it. :)
You can use the cross platform libcurl to easily download webpages through http (and various other protocols).
Check out this answer for a simple example Download file using libcurl in C/C++
Related
It's pretty much the tittle.
Im not expecting the whole code to just copy and paste (but feel free to do it). Im just having difficulties to find some data related. If someone knows how to do it, please post some hints, article links, specific words to make some research on it.
Thank you.
As Christian mentioned in his comment, your problem can be solved by implementing an HTTP client that parses JSON responses, independently of the technology used by your server. To do this in C++, I would refer you to the following resources:
High-level library for C++ HTTP client.
libcurl (lower level library for HTTP requests).
RapidJSON library to parse the responses you will get from your server (see this benchmark for a comparison of JSON parsing libraries).
If your C++ application uses a framework such as Qt, it likely includes facilities for requests (e.g. Qt HTTP example).
On the server side, you will have to define HTTP endpoints that return the data you are interested in, encoded as JSON. The beginning of this tutorial shows an easy way to do that.
node.js c++ add on manual
https://nodejs.org/api/addons.html
http://libuv.org/
use libuv function in node.js 0.12.x
I am a SOAP/WebServices newbie, and have been given a WSDL file that has a bunch of web services that I can connect to.
What is the easiest way to parse this and show me what services are offered, and what the input and output parameters are that are required? I really don't want anything more than this, but for whatever reason I can't seem to google an answer.
The closest I've gotten is using wsdl2java from Apache Axis, however it creates a whole bunch of Java objects. What I really want is very basic, which is give me a list of all of the services available, and the input/output parameters.
Does such a thing exist or do I need to build this myself?
Without installing anything I suppose this link would work but it requires that your WSDL be web accessible...
http://www.validwsdl.com/
Other online parsers may be better. Personally I'd recommend installing Eclipse with the web services plugin or the demo version of SOAPSonar, but if you only need to peek at what a WSDL offers without having to dig through the XML, then the above link might be an acceptable option.
I'm using libcurl to open/save a remote file and parse html files and everything is going great.
I was wondering if it's possible to use c++ and curl to login to a website (not a ssl one) and from there maybe manipulate the html that is generated?
I would love to do that within my executable (not to use php).
Thanks in advance.
I figured there is a way if anyone stumbles upon this. there's an example here:
http://www.hackthissite.org/articles/read/1078
the website has a some what black hat approach but the example provided was useful.
My boss wants me to write a simple RSS feed for an C++ MFC app that will pull and display information from the company's website. It also must be able to grab program updates from the website, tell the user that there are updates and then install the updates. Are there any tutorials that follow these guide lines? How would stackoverflow.com implement these requirements? Libraries, tutorials or guidance would all be great!
RSS is not more than XML (Ref). Under Windows/MFC you can use MSXML directly or use this MSXML wraper class, tinyxml, or other any other XML library to handle XML.
Update:
To download RSS you can use CHttpFile.
How can I get Google search results from inside a program? I need to get an array of search results for a specified string.
C++ requires a little more work then other languages. You will need to connect to Google's REST Search API and then use a JSON parser to parse out the search results. Json.org has a collection of JSON parsers in various languages.
Use their javascript search API http://code.google.com/apis/ajaxsearch/
They no longer support their SOAP search api unfortunately
So... nine years later, you can no longer do that. You do get JSON, but it's quite short and just says "The Google Web Search API is no longer available. Please migrate to the Google Custom Search API (https://developers.google.com/custom-search/)"
Google Custom Search can search the entire web using the 'Thing' schema.org topic. https://support.google.com/customsearch/answer/4513886?visit_id=636769478248533420-865620074&rd=1
Google offers Ajax API for JavaScript programmers and a poor documentation for Python, PHP and Flash.By the way, If you are able to connect to remote http server with any other c++ library, you can do it. just change the url you are using and point it to: http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q={My_CPP_Query}
You will get JSON data stream, that you will be able to work with.
i remember i saw youtube tutorial on doing that, not sure about the library name but its something like _NT_SEARCH_GH:etcetcetcetcetcetc;