Questions tagged [curl]

3

votes
0

answer
301

Views

cURL 28 error. network issue?

I am in the process of learning to use Wordpress and am hosting sites locally so that I can practice. I am, however, getting an error whenever I try and install a new theme or plug-in. The error is as follows: 'cURL error 28: Operation timed out after 0 milliseconds with 0 bytes received.' I do not...
Gillian Deanna
2

votes
0

answer
79

Views

signal: killed and server freezes after post

I have this weird message after successfully posting an article. [GIN] 2017/07/18 - 08:43:21 | 200 | 42.729836ms | 127.0.0.1 | POST /api/articles signal: killed The post that I make using curl is: curl -X POST http://127.0.0.1:8080/api/articles -v --cookie 'domain=somelongstring' -F...
Karlom
3

votes
0

answer
1.1k

Views

Getting empty cURL response with status OK 200

I'm using cURL to make some API calls, and everything worked fine until today. The only thing that changed is that I've added some content to the db that the API returns. The interesting thing is that I get a http_status of 200, but an empty response. What's even stranger is that some other calls do...
Slavenko Miljic
2

votes
0

answer
639

Views

cURL from host-to-container works, but from container-to-container does not

Title pretty much says it all, but let me give some context. I have a MySQL instance running one one container, an API running in another, and a script running in a third. The script hits (or is supposed to hit) the API running in the second. These are all on the same physical machine (on DigitalOce...
Ryan Spicer
3

votes
0

answer
1.1k

Views

curl with chunked Transfer-Encoding

I'm using curl to get a web page with chunked Transfer-Encoding header. When I execute the command on linux bash (CentOS) I receive the pid of the process and I get back the shell, it seems curl is executed in background and after some minutes on the shell itself it appears the output html, I'm assu...
Bagbyte
2

votes
0

answer
456

Views

Imgur API 3 uploading to account PHP

I have the following code uploading anonymously just fine but I cannot seem to figure out for the life of me how to login to my account to upload. I see you need to use OAuth and need to refresh your token every hour but this is something I cannot seem to get my head around as I wouldn't know where...
Tony James
2

votes
0

answer
947

Views

PHP cURL 7.36 error: Error while processing content unencoding: invalid code lengths set

I've come across a really weird behaviour (bug?) while using curl to download a gzip compressed XML file from PHP. The error message reads : Error while processing content unencoding: invalid code lengths set Weird thing is, it only happens on my local machine when using curl from PHP. Running the e...
Hirnhamster
2

votes
0

answer
187

Views

API response with a proxy is working with the curl, but nothing is returned with python

I am trying to access data using API which is behind the proxy server. If I use curl command like below it works: curl --proxy http://MY_PROXY_SERVER:PORT --header 'Accept: application/csv' http://WEB_SERVER_ADDRESS/data/CHANNEL?start=1470011400 I get the data which is expected. When I am trying to...
Devendra Desale
2

votes
0

answer
215

Views

cURL Not Working through Proxy with Minecraft API

I have the following code which checks whether or not the Minecraft user can login to it's services and the output of the cURL requests seems to be 'boolean false' for every request when I did my debugging, which is strange because if you enter the URL with the proper values of course into your brow...
Orca
4

votes
0

answer
6.2k

Views

curl hanging, despite connect-timeout and max-time

I have some scripts retrieving resources (image files etc) using system calls to curl. Occasionally, these will fail to finish, and will show as pipe_w in process listings. F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 S root 4378 4086 0 82 2 - 16002 pipe...
Jurgen Pletinckx
2

votes
0

answer
105

Views

How to Use Audience Network System User Token

I've read here and successfully getting report using Short Term User token. The problem is the token not lasting. So i tried using System User Token but getting error as below: 'message': '(#3000) Reading Insights of a Page/App/Domain/Event Source Group not owned by the querying user or application...
user3613026
2

votes
0

answer
426

Views

PHP Curl post [savefrom.net]

I am trying to get the download link from savefrom.net website, I am using the following code :
geekrules
3

votes
0

answer
610

Views

Use PHP CURL to call self Restful APIs hangs forever

I want to write a script to call one of my Restful APIs every one hour. I use Laravel framework. Here are the codes: TestController.php class TestController extends BaseController { public function __construct(ItemCriteria $itemCriteria) { parent::__construct($itemCriteria); } public function sayHi(...
Arst
2

votes
0

answer
1.7k

Views

Using CURL send an email through a proxy

I want to make a script in PHP that connects trough a proxy to TELNET at an smtp server. What i have so far are those two variants : 1 FSOCKOPEN (that i cannot proxy this connection) $connection = fsockopen('smtp.comcast.net',25,$errno,$errstr,10); if(!$connection) { echo 'Connection error'; } else...
HashGuy
2

votes
0

answer
222

Views

POST variable omitted when sending out CURL request in PHP

I am sending out a POST request using CURL in php with several POST fields as an array: $post = array( 'ctl00$ctl00$ContentPlaceHolder1$phSearchHeader$ddType' => 'x', 'ctl00$ctl00$ContentPlaceHolder1$phSearchHeader$txtPostcodeStandard' => 'x' ); $ch = curl_init('xxx'); curl_setopt($ch, CURLOPT_RETUR...
klaro87
4

votes
0

answer
430

Views

403 error received when logging in via curl PHP. Cookie issue?

I've been really having a tough time with this. This (in theory) should be pretty straightforward. My log-in attempt looks like this: $curl = curl_init('https://login.example.com/login'); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); curl_setopt($curl, CURLOPT_R...
user2029890
3

votes
0

answer
622

Views

php curl nss initialize error

I use php curl to visit https website such as 'https://api.mch.weixin.qq.com' in a php-fpm environment, the code is:
youly
4

votes
0

answer
6.2k

Views

Client certificate for postman and Chrome browser

I need postman to connect to my server which requires client certificate. After some research, it seems that postman does not handle certificates itself but relies on Chrome certificates instead. My next step was to try to install the certificates in Chrome, my cert structure is like this: Self-sign...
nullgraph
4

votes
0

answer
343

Views

How To Use authenticate_or_request_with_http_token With Grape?

how can I implement authenticate_or_request_with_http_token in grape API. Below is my code : module Articles class ArticleData < Grape::API include ActionController::HttpAuthentication::Token::ControllerMethods # http_basic do |email, password| # user = User.find_by_email(email) # user && use...
Mohamad Afiq
3

votes
0

answer
2.2k

Views

Attempted to call function “curl_init”

I know this question was answered a lot of times here but I tried many things and I cannot fix it. I am developing using symfony 3. First of all I thought I hadn't php-curl so, I decided to install it doing sudo apt-get install php-curl It worked! So, I restarted Apache... and tried again.. and the...
Victor Ribero Guasch
4

votes
0

answer
409

Views

How to send attachment using mailgun?

I am trying to send attachment using curl through mailgun but its sending email with out attachment.(I am receiving email with only html part but no attachments.) Here is my code $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, 'api:'.$api_key)...
salin kunwar
2

votes
0

answer
410

Views

Solarium - curl error - using solr under php 7

I am using Solr 5.4, with its user interface working perfectly. I've installed Solarium to help with the development of my user interface. Although, I am receiving this error when trying to use the example codes: Fatal error: Uncaught Solarium\Exception\HttpException: Solr HTTP error: HTTP request...
Evis
2

votes
0

answer
34

Views

CURL through PHP with SFTP support

I am using Ubuntu 16.04, running PHP7.0 and Magento2. I have installed a Magento Plugin which requires CURL SFTP to send an XML product feed to a remote server. I noticed that the default CURL installed with Ubuntu does not support SFTP, so I followed instructions to re-compile it on the server, an...
Art
3

votes
0

answer
293

Views

CURLOPT_HTTPHEADER with a custom header with an accent is not processed correctly

I'm sending a custom value in the header that has an accent but curl is not processing the accent. Here is the code: $headers = array( 'environment: testé', ); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'http://test.url.com/getStuff', CURLOPT_USERAGENT => 'Codular S...
flacoding
2

votes
0

answer
516

Views

POST Data to webpage using cURL

I have read many QA regarding posting data to website search field and press submit button. I followed below solutions but still no luck. Example1Example2Example3 I want to POST data to for example this website which search box and button code as follows, Search But this code is not included in an...
Steve
2

votes
0

answer
2.4k

Views

curl: (23) Failed writing body (0 != 892)

on running command curl 'http://localhost:8081/index.android.bundle?platform=android' -o 'android/app/src/main/assets/index.android.bundle' : getting error % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0...
L.Learner
3

votes
0

answer
450

Views

How can I search into Linkedin by PHP?

I have a PHP script which opens http requests by using CURL: (it also accepts header if it is needed) $c = curl_init(); curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); if ($post_paramtrs) { curl_setopt($c, CURLOPT_POST, TRUE); curl_setopt($c, CURLOPT_POSTFIELDS,...
Martin AJ
2

votes
0

answer
202

Views

Python requests zip upload makes zipfile unreadable in Windows

I'm trying to upload a zipfile to a Server using Python requests. The upload works fine. However the uploaded file cannot be opened using Windows Explorer or ark. I suppose there's some problem with mime-type or content-Length. Oddly, uploading the file using curl, does not seem to cause the same pr...
TheFrozenOne
4

votes
0

answer
5.9k

Views

curl: (7) Failed to connect to localhost port 9200: Connection refused

I got this error: curl: (7) Failed to connect to localhost port 9200: Connection refused when i typed curl 'localhost:9200/_cat/indices?v'. I setup elasticsearch 1.7 and afterthat i edited file elasticsearch.yum: cluster.name: elasticsearch node.name: 'Elasticsearch' network.bind_host: localhost net...
truong donnie
2

votes
0

answer
257

Views

curl returns correct result but hangs on LDAP

I faced a strange issue while querying LDAP Active Directory via curl: directly and via R wrapper - RCurl. When I run RCurl under R session on Windows, my query is evaluated and result is returned immediately. Everything is fine. When I do the same under R on Linux Debian, it hangs. So I've run the...
Bastian
3

votes
0

answer
1.8k

Views

Debugging slow download with curl

I've seen a very strange phenomenom I don't understand. I'm trying to debug a slow download speed from one of my server, and I use the following command from an external machine: curl -w '@aa' -o /dev/null 'http://myserver/bigfile' where the file aa contains reporting format as shown below: DNS look...
xtof54
2

votes
0

answer
4.9k

Views

cURL Error No : 7 - Couldn't connect to host!

I did ask a similar question around last week and did got some info on how to proceed with curl call errors. My scenario - I am doing a cURL call to a webservice, and I would say around 90% of times the curl calls are successful for the same calls, but it fails for many! I did some googling which...
jtanmay
2

votes
0

answer
401

Views

Curl with Simple HTML DOM using Link Pagination

I want to combine Curl and Simple HTML DOM. Both are working fine separately. I want to curl a site and then I want to look into the inner data using DOM with pagination page numbers. I am using this code. How can I combine this to make it work as one single script?
KenDev
0

votes
0

answer
517

Views

trying to send steam trade offer with php curl

im trying to send steam trade offer using php and curl. i pretty sure that my code is correct but i keep getting this when executing the php page : string(4) 'null' here is the full php code (Ps: i use php-steamlogin to get sessionID + cookies github.com/SzymonLisowiec/php-steamlogin/ and i use ano...
Nàdir
0

votes
0

answer
36

Views

Get remote file name upload via PUT method using CURL

I am uploading file in REST web service using scala. The curl command is like this: curl -i -s -X PUT http://localhost8080/project/resources/user/content -T 'test.txt' My question is there a way to get the source file name 'test.txt' in REST web service @PUT method? edit: we use akka directive extr...
Pratap D
3

votes
0

answer
616

Views

WordPress admin hangs on MAMP 4 and macOS Sierra

Since I updated to macOS Sierra and MAMP 4 the WordPress admin hangs before loading. This only happens on a dashboard and updates page. The page takes about 1 minute to load and displays the following error on top: An unexpected error occurred. Something may be wrong with WordPress.org or this serve...
Daniel
2

votes
0

answer
214

Views

Download part of a video with curl

I'm trying to download a segment of a video using CURL. When I use curl_setopt($ch, CURLOPT_RANGE, {TIME-RANGE-IN-BYTES}); I get a part of the file, but it still holds the original time frame and plays a blackscreen through it all. Is what I'm trying to do even possible? Thanks ahead
Sharon Gil
4

votes
0

answer
284

Views

readv() failed on PROPFIND request while reading php://input (PHP 7, nginx)

After upgrading my Server to PHP 7 I get several errors while running ownCloud in its current version 8.1.1. I tried to figure out what the problem is and I came down to Sapi.php of Sabre lib. I wrote a very small test script to isolate the error. While running the following code using a PROPFIND re...
Techsigns
2

votes
0

answer
95

Views

Can not get the confirmation message of ajax request to send sms?

I have a code below. When I submit the form AJAX I got the SMS, but confirmation message not displaying on user front end. Also, how can I get the cURL response result. I use var_dump($response), but it displays just bool(true) message sent or not sent. I follow some instruction in this PDF viewer d...
Riyadh Ahmed
3

votes
0

answer
62

Views

Facebook PHP Graph SDK performance issue

I'm currently using Facebook PHP SDK v5 for a simple task: converting a Javascript short-lived user token to a long lived one and returning it. The issue I'm having is that the requests seem to take a very long time when issued from the SDK compared to Postman or the Graph API explorer. In order to...
Marco Bellan