cURL is a library and command-line tool for transferring data using several protocols such as HTTP, FTP and Telnet.
1
vote
0answers
40 views
C++ - cURL data downloader
I have written cURL based data downloader. It seems to be working as expected, but is there anything, that could be potentionally dangerours? Or something, that should be written differently?
Header:
...
4
votes
2answers
80 views
C++ Wrapper for cURL: Multithreading and serializing asynchronous ops
I did this library to help me from one of my projects and decided to publish it on GitHub hoping people might find it useful, convenient and easy to use in their projects too.
It's a header-only ...
3
votes
1answer
80 views
Downloading images using CURL
I've written this class that downloads an images, the URLs for which are read from a local .txt file. I'm keen to make sure my code is safe and efficient.
...
0
votes
0answers
18 views
Pool of curl handles (Take 2)
Continued from here: Pool of curl handles
This is my second attempt. Improvements include 1) cannot copy connection, 2) connection doesn't leak CURL* pointer 2) closed connections release the handle
...
3
votes
1answer
51 views
Pool of curl handles
I am trying to write a simple reusable pool of curl handles. I found this wonderful implementation of the blocking queue.
The pool itself looks like this:
...
2
votes
1answer
117 views
Combining json responses of recursive web service calls with PHP and curl
I'm implementing the Hotel Price List API from Skyscanner. This requires a first call to the service to implement a session followed by 1 or more calls to the service to get the actual results. I've ...
1
vote
2answers
97 views
Sending email using libcurl - follow-up 2
This question is a continuation of: Sending email using libcurl - follow-up
Does this code have any problems? Can I improve it?
...
0
votes
2answers
99 views
Movie data scraping
I enter in the IMDb link and YouTube trailer link in the command line to a movie and the first main program loads all the info about the movie. The second main program uses an IMDb link to the movie ...
3
votes
1answer
108 views
Sending email using libcurl - follow-up
This question is continuation of: Sending email using libcurl
I developed a class to send email. Does this code have any problems? Is it thread-safe?
...
2
votes
2answers
280 views
Sending email using libcurl
I developed a function to send email based on this. Does this code have problems? Also, I'm not sure if this code is thread-safe because of the global payloadText ...
1
vote
1answer
37 views
Extracting site visit information from a REST API call, including addresses from a MySQL database
I'm building a web app that pulls data from a ticketing system via REST API. I'm currently able to pull all of the data I need just fine but the loading process is really slow. I'd love any feedback ...
3
votes
1answer
37 views
Parses XML to return the bus times at specified bus stop
The code uses the XML-based OC Transpo data feed to create a list of the bus name, where it's headed, and the times. Keep in mind that I am a beginner at python so any advice at all is appreciated.
<...
1
vote
1answer
182 views
Using cURL to retrieve remote image
I am using the following code to retrieve the URL of a random image in a remote folder that I own.
As a newbie and although this is working I would like to know if this is done properly, if it could ...
1
vote
2answers
61 views
Crawling SPOJ through cURL and C++
I am trying to write industry standard code.
https://www.quora.com/How-do-I-follow-a-user-on-Spoj-for-solving-problems-Refer-Details
Someone gave me this A2A.
And I wrote this code for it
...
3
votes
2answers
135 views
calloc, malloc, free and realloc wrappers to store the size being allocated
I'm currently building a node.js addon for libcurl. Right now I'm trying to correctly use v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory to ...
1
vote
0answers
19 views
3
votes
1answer
106 views
4
votes
0answers
110 views
Reusing curl easy handles in C
In a C project I want to reuse curl easy handles. The flow of program is like:
Client --> C Application --> Call URL1, do something, Call URL2, do something, Call URL3...
In short, for each client ...
4
votes
1answer
214 views
Pulling data from API, Allowed memory exhausted
I'm working on a project where I pull data (JSON) from an API. I would like to manipulate this data and store this as useful information in my DB (MySQL). My code is working if I would like to make, ...
1
vote
0answers
140 views
URL image validation
I'm trying to write a method to validate an image from a URL. The method will accept an array of image URL. The image should be validated by its type, size and dimensions. Right now, I'm able to ...
1
vote
1answer
90 views
Checking whether a site is up or down
I have this PHP curl function to check if a site is online or not:
...
10
votes
2answers
582 views
Sending an SMS message in C
Recently I've been fiddling with the idea of sending a text message using C. Looking at a few options, I thought that using libcurl to send an SMTP email using TLS for some security would be the best ...
3
votes
1answer
228 views
cURL GET requests receiving XML data
First of all, I would like to know if there is any difference (execution-time) in C between:
GET request made by using cURL
GET request make by using sockets (BSD sockets)
Second, I've done a C ...
2
votes
2answers
1k views
Upload image from Remote Server using URL
This PHP class is to allow user to enter a URL of a remote image file and have it download the image to local server. It will be used in a Markdown editor just like Stack Overflow / Stack Exchange ...
7
votes
1answer
102 views
Testing uptime of my personal server
I made some code to test my personal servers uptime. It logs in to my router page and sees if it returns status 200. A cron job runs it every 5 minutes. Please let me know if I can make the code more ...
1
vote
1answer
78 views
DMZ passthru script
I have a server that cannot be connected to from the internet, but I need to get some info to it. I have another server that can, so I have a simple passthru script that I want to see if you all think ...
9
votes
2answers
2k views
Pinging a URL with libcurl
I've asked a question about pinging a URL before, but I wanted something that was a bit shorter and still just as efficient. libcurl seemed to be the perfect answer. Here is my method:
...
10
votes
3answers
125 views
Dynamic library to intercept oddsock hostname lookups
Just for the fun of it, I decided I would try to create sort of an intermediate DNS system for the oddsock SOCKS proxy. With this, the domain name extension .unet is statically resolved when requested....
5
votes
1answer
115 views
Reverse-engineering with Filepicker API
I have this script to pull data out of the Filepicker API internal. It's mostly reverse-engineering and the code seems to be ugly to me. How can this be improved?
...
8
votes
1answer
232 views
Optimize web-scraping of Moscow grocery website
This code works fine, but I believe it has optimization problems. Please review this.
Also, please keep in mind that it stops after each iteration of the loop ...
8
votes
1answer
550 views
Bash script to clone all public repos or gists for a specified user, optionally to a directory of choice
I wrote this script as a way to backup and/or download quickly a set of repos or gists from a user. I don't have any major concerns but I'm a noob at bash scripting, and I've been scouring the ...
4
votes
1answer
2k views
Wrapping Curl, an HTTP client
I have written an HTTP client wrapped the libcurl. It should be able to do HTTP get/post with string/map param, with cookies and proxy.
Can somebody review the code? B.T.W., I'm not sure the way ...
2
votes
1answer
210 views
Webhook Structuring
I am building a Webhook model so users can receive data from a messaging app.
I have never created such a system before, and I'd like to get some feedback on my attempt.
...
9
votes
1answer
359 views
HTTP Stream Part 2 A stream that opens an HTTP GET and then acts like a normal C++ istream
The review I asked for yesterday was for a header only library.
HTTP Stream A stream that opens an HTTP GET and then acts like a normal C++ istream
This has some limitations as it downloads all the ...
12
votes
1answer
833 views
Stream that opens an HTTP GET and then acts like a normal C++ istream
Needed a quick stream to get JSON objects.
...
2
votes
1answer
95 views
Downloading the oldest available version of some data files
I am using the cURL tool in MATLAB 2013b with Ubuntu to download a whole bunch of files. The files have one of three possible versions: 1.0.0, 2.0.0, or 2.1.0. Using the HTTP, I first check the ...
2
votes
1answer
324 views
Bash script to monitor Webserver php script
Below is a script I wrote today to use CURL to monitor the length of various HTTP server outputs and output a response if this is different than 103 characters.
This is my first bash script, so I had ...
2
votes
3answers
686 views
Service status checker… Is there a more efficient way?
I've been working on a website status checker.. However this array that I use has around 30 sites within it, I've noticed it's taking around 6-7 seconds to load it.
I was wondering if there's any ...
5
votes
1answer
1k views
Secure CURL to & handle response from Payment Gateway
I'm using a payment gateway and am trying to implement the post and response handling with CURL so that it all happens on one page.
The following is tested and works but I want to double check it's ...
1
vote
3answers
7k views
Calling restful web services efficiently
I need to use this code to fetch data from web service and show them in a site properly but after I request for the webservice I am unable to load them fast. Site is loading very slow.
...
3
votes
1answer
590 views
Optimizing PHP script fetching entire HTML pages
The following script should get links which are stored in a text file (line by line), then put them into an array and finally scan each links' source code for a certain line. If this line is found, it ...
3
votes
1answer
2k views
DownloadFile Function (using LibCurl)
Please tell me if this function is correct (I believe it to be), efficient, and clean.
Function to check:
...
4
votes
2answers
3k views
Improve multithreading with network IO and database queries
I'm writing a script that:
fetch a list of urls from a db (about 10000 urls)
download all the pages and insert them into the db
parse the code
if(some condition) do other inserts into the db
I have ...
2
votes
1answer
209 views
Getting a remote file to local storage
I've prepared a function using cURL to get a remote file to the local storage:
...
3
votes
1answer
3k views
Tiny Curl C++ wrapper
I have written this sample code to fetch a web page in C++ using libcurl. Please review it.
...
4
votes
1answer
266 views
Dynamic IP-address logging
Inspired by Don Stewart's article on Scripting with Haskell I tried a rewrite of a shell-script I did the other day. I was really astonished how easily it worked but as a whole it is about double the ...
11
votes
2answers
6k views
Handling many networking exceptions in Ruby
What would be a prettier/faster way to do handling of multiple errors in Ruby? Here is the code I am working with:
...