Questions tagged [curl]

2

votes
0

answer
46

Views

issue with uploading file to ftp server

I am trying to upload a file to the FTP server. Here is my code - $csv_filename = 'orders/'.'alp'.'-'.date('Y-m-d_H-i',time()).'.csv'; $filename = 'alp'.'-'.date('Y-m-d_H-i',time()).'.csv'; $fd = fopen ($csv_filename, 'w'); file_put_contents($csv_filename, $data); $ch = curl_init(); $localfile = $c...
Michel
2

votes
0

answer
507

Views

php curl request working from localhost PHP 5.5 but not on server with PHP 5.3

Below code of my curl is working on PHP 5.5 and fetches the page correctly. But same code on my AWS server when run gives access denied, http_code 403. /** * Get a web file (HTML, XHTML, XML, image, etc.) from a URL. Return an * array containing the HTTP server response header fields and content....
Mangesh
3

votes
0

answer
958

Views

Proxy Error 502 Openshift

I'am using Openshift Demo in my local machine and Drupal project, when i submit in a form.php i need to create an app with the REST API with the curl lib, and i get the : Proxy Error 502 The proxy server received an invalid response from an upstream server. The proxy server could not handle the requ...
user3524724
0

votes
0

answer
443

Views

GET simplified data via curl in etcd

I am a bit of a noob to curl/REST, and have looked but can't find much that makes sense to me. am playing with etcd, storing some keys, i can use etcdctl to pull a single return, which is very handy, as I intend to echo such things into config files; etcdctl get /dtank/facts/server/IP 10.2.0.91 whi...
Ben Harker
2

votes
0

answer
278

Views

Asana project export via bash / curl / etc example

I'm trying to create a shell script for exporting all projects out of one Asana account. I got it to work temporary using a huge cookie description in a header, but this stops working when restarting or else of course. I am aiming for an automatic export script for all projects. Please show me an ex...
sebish
0

votes
0

answer
77

Views

cRUL error 60: SSL certificate issue when installing Wordpress plugin

I am trying to install Wordpress plugins and see this error: 'Installation failed: Download failed. cURL error 60: SSL certificate problem: unable to get local issuer certificate'. Previously I run this command: 'npm config set strict-ssl false' to turn off strict-ssl but turned it back on after tha...
tuan_pham
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
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
1

votes
0

answer
205

Views

All CURL functions returns null in php

php5-curl is installed but curl_exec() returns null, curl_errno() returns 0, curl_error() returns null, curl_getinfo() looks like curl_exec() never fired. Sample of code $this->curl = curl_init(); $agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0'; $curlOptions = arr...
QuAzI
0

votes
0

answer
89

Views

cURL: SSL certificates on two different Amazon AMI servers not working the same

I have a problem with two Amazon AMI servers: Amazon Linux AMI 2018.03 (server 1) Amazon Linux 2 LTS Candidate 2 (server 2) I sat an instance two of them yesterday, becouse when I'm using a curl command: curl --verbose https://testchain.cardeasexml.com/ultradns.php On server 1 I get: Trying 91.197....
Matthew
1

votes
0

answer
568

Views

Apache not loading cURL extension

I'm using: Windows 7 Apache 2.4.16 VC11 32 bits PHP 5.4.43 VC9 ts 32 bits And: I have php installed on C:\DevTools\php and made that directory Path accessible (so curl extension has access to libeay32 and ssleay32 dll's). extension_dir is correctly set on php.ini. as extension_dir = 'C:\DevTools\php...
0

votes
0

answer
279

Views

PHP/curl request dropping POST body and HTTP headers after NTLM authentication

I'm attempting to build a two-way Slack integration with on on-premises Microsoft TFS REST endpoint, using Node.js and PHP as the main processors of the data to and from. I can successfully perform GETs against the on-prem TFS install using NTLM authentication, and parse the data through to Slack. S...
ctgilley
0

votes
0

answer
2.7k

Views

error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure occured

When I use a curl request, there appears an error. I already tried another article answer, but didn't worked. curl_setopt( $curl, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');` // add this, not worked curl_setopt( $curl, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');` // add this, not worked My server version: PHP Versio...
Hwaeun Lee
0

votes
0

answer
19

Views

Heroku - Send PHP Curl with port to NodeJS

so i tried to upload my web application to Heroku and now im confused Im pretty new in curl also nodejs, almost all my controller have function with curl in it and these function will send the data to nodejs. I have been reading that in heroku, nodejs will listen to the assigned port (using this li...
Raven Choi
2

votes
0

answer
24

Views

CURL post could not upload csv data to blaynmail

$file = 'blaynmailhahaha.csv'; $authorization = 'Authorization: Bearer ['.$response.']'; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'https://api.toku-maga.com/rest/1.0/contact/import/create'); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSIO...
MD ZIAUDDIN
2

votes
0

answer
284

Views

HTML Encoded JavaScript

I recently got the 'joy' of opening an HTML file that was similar to an expected receipt such that I opened the HTML file. To which, part of the HTML pulled down a JavaScript from a non-descript site that has subsequently removed the content. I grabbed it via cURL before it was removed. I know the m...
Matt
3

votes
0

answer
1.4k

Views

Instagram changes the video URLs every few days?

Just found a strange happening with Instagram video. I'm building a social network site on localhost that pulls in users data from their other social feeds and displays it. One of these external sites is Instagram. Up until yesterday everything was working fine, both photos and videos were displayin...
spice
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
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
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
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
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
3

votes
0

answer
507

Views

PHP Curl certificate problems, fix it once and for all

This is not a duplicate, I've read hundreds of posts and documentation about this, and I still can't get cURL to work on my local machine, despite having tested nearly all test cases. PHP Info Version: 5.5.36 php.ini: /etc/php.ini SSL: Yes SSL Version: SecureTransport Certificate downloaded here: ht...
Romain Bruckert
2

votes
0

answer
486

Views

SSL connect error error 35 in paypal curl request

When i am making a payment in paypal, its throws 'SSL connect error (35)', even i have a enabled TLS. And also i have tested with 'https://tlstest.paypal.com', is also return same error. Following sample i used to test TLS. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://tlstest.paypal.com...
user2861298
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
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
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
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
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
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
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
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
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
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
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
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
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
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