curl: argument list too long

This is coming up because you are trying to pass the entirety of the base64’d content on the command line. curl has the ability to load in data to POST from a file, which I’d recommend doing. More information can be found in the man page, but the basic format is this: curl -X POST … Read more

How do I download a file to a newly created directory with curl on OS X?

You could try using the –create-dirs argument which was added in curl 7.10.3: Here is an example that will create the directory hierarchy, (if it doesn’t already exist), and will name the subdirectory you require renamed with the output of the datecommand: curl -o /db-bkups/$(date +”%b-%d-%Y”)/timestamp-db.dump –create-dirs http://www.w3schools.com/xml/simple.xml The result is a file stored in … Read more

cURL – Structuring request to validate server sent events

SSE is a text-based protocol, and curl is a great way to troubleshoot exactly what your connection is sending. The command is this simple: curl -N http://127.0.0.1/path/to/clock.php (The -N stops any buffering, so data is shown as it is received.) And it outputs this: data:2015-07-07 06:19:27 data:2015-07-07 06:19:28 data:2015-07-07 06:19:29 data:2015-07-07 06:19:30 data:2015-07-07 06:19:31 data:2015-07-07 … Read more

PHP CURL Enable Linux

If anyone else stumbles onto this page from google like I did: use putty (putty.exe) to sign into your server and install curl using this command : sudo apt-get install php5-curl Make sure curl is enabled in the php.ini file. For me it’s in /etc/php5/apache2/php.ini, if you can’t find it, this line might be in … Read more

Linux Bash: How to open a websocket connection as client

My tool websocat is specifically designed for this. websocat ws://your_server/url You can connect and exchange data with your server. By default each line becomes a WebSocket text message and vice versa. On Linux it is more comfortable to play with it using readline: rlwrap websocat ws://your_server/url. It is not the only CLI websocket client. There … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)