Questions tagged [curl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

cURL error for cron

I have this error which causes me a lot of trouble with all of my crons for some of my website : cURL error 28: connect() timed out! The websites are stored on a shared servers i guess, how can I ...
0
votes
0answers
15 views

Adding data to Yoast Meta Title/Description through Wordpress Rest API

I have been trying to add data via WordPress Rest API to the Yoast fields of meta title/ description but it doesn't seem to update it. I have used the following code where I have passed the meta ...
0
votes
0answers
24 views

WP Refused to display 'URL' in a frame because it set 'X-Frame-Options' to 'sameorigin'

I'm a beginner to WP development, I'm editing a plugin to add third-party payment gateway when i did the same code in normal php files i didn't had any error and it worked yet in WP cURL didn't follow ...
0
votes
1answer
31 views

Uploading a media item with the wp-json API to a specific path

I'm using the WP-JSON API to import all my posts from my live site to my development site. It's working fine for posts, categories and authors, but when I upload my images, the API treats the files as ...
0
votes
0answers
16 views

CF7 bitrix24 webhook don't sent files

I use standard webhook template for integrate CF7 to bitrix24. All works fine exclude files. I see nothing in CRM. add_action( 'wpcf7_mail_sent', 'your_wpcf7_mail_sent_function' ); function ...
0
votes
0answers
45 views

cURL RETURNTRANSFER function in wp_remote_post

I have this cURL code below which is running on PHP, yet when I did it with WordPress it didn't work. I tried using WP_REMOTE_POST I couldn't do the return transfer function of cURL, what can be a ...
1
vote
1answer
18 views

Programmatic Login from 3rd Party site

I'm trying to do a sort of SSO/programmatic login solution for our wordpress site from our separate web application. I don't have a lot of experience with wordpress so I assume there's something I'm ...
0
votes
0answers
8 views

Remotely access WP Admin menus / functionalities

I am building an app which manages WP sites remotely. All that is managed via the WP RestAPI poses no problem, but for such things as upgrading\ Updating / Uninstalling plugins, and other similar ...
0
votes
0answers
21 views

Retrieving X-WP-Total header using cURL

I am accessing a WP site from an outside app and using the restAPI routes / endpoints to work with posts, pages, comments, users, etc... I am wondering how I can change / use the below cURL to ...
2
votes
0answers
9 views

How to automate filing a form as a user

Sincere apologies if this has been asked and answered. I'm a software developer with almost 0% experience in web. I write C/C++ engineering applications. I want to automate filling in a form on a ...
0
votes
0answers
26 views

Installation failed: <!DOCTYPE html> 504 - Gateway Timeout

When installing the big plugins I am getting this error - WooCommerce. This problem does not happens with small plugins. It takes long time to install the plugin. Installation failed: <!DOCTYPE ...
0
votes
0answers
402 views

cURL error 60: SSL certificate problem: unable to get local issuer certificate

I've been researching for hours, but I don't seem to find a solution. I've tried every single solution I've found. We're running Wordpress 5.4 with PHP v7.4 in a Windows 2019 server that's behind an ...
1
vote
1answer
242 views

Use wp_remote_get to get JSON instagram feed from public profile

I'm using the curl php library to get the instagram json feed from a given public profile. I want to use wp_remote_get() because on the host I'm using for this project, I don't have the ability to use ...
0
votes
1answer
25 views

Inconsistencies between wp_remote_post and cURL

I can successfully make the RESTful post using cURL: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.mindbodyonline.com/public/v6/usertoken/issue'); curl_setopt($ch, ...
0
votes
0answers
82 views

Download failed. cURL error 6: name lookup timed out

The problem is that I get Download failed. cURL error 6: name lookup timed out when getting a parent theme on wordpress.
0
votes
0answers
43 views

Hide response returned from WordPress REST API call

I have created this simple WordPress REST API where users can perform:   Option A • Types in the following URL in browser:       → www.example.com/wp-...
0
votes
0answers
20 views

WordPress transients not rendering

Could someone tell me what I might be doing wrong with my below cURL + Transient call? When the page loads the first time, it pulls in all the cURL data and then on refresh it's not loading anymore. ...
0
votes
1answer
75 views

WordPress transient not working with WP Engine

For some reason, when we we're on another server (Tierpoint) everything worked fine and we recently switched over to WP Engine and the transients that I was using for my module have stopped working. ...
0
votes
0answers
206 views

cURL timeout error 28 in Site Health and Sucuri SiteCheck

I run a server hosting multiple WordPress installations with the iThemes Security Pro plugin installed. One of the things that this plugin does is it uses Sucuri SiteCheck to scan the site for ...
0
votes
0answers
15 views

cUrl result: Tell if the result is a single post or a blog roll of latest posts?

If I cUrl a remote WordPress site, and I'm looking at the HTML response... What is the canonical method to determine if I'm looking at a blog roll, or a single post? My guess: I don't think there is ...
0
votes
0answers
30 views

WP-Cron: Cannot execute crons on servers without registered domains

My test environment does not execute WP-Crons properly because cURL can't connect to the "fake" domain. I'm using WP 5.23 on an NGINX server without a registered domain (by editing my hosts file). ...
1
vote
1answer
490 views

Download failed cURL error 7: . Can't update anything

Please, help. I want to update WordPress(or plugins), but always the same error: 'Download failed: cURL error 7: .' OS: Linux Fedora 30. Server: nginx. DB: MySQL 8.0. PHP 7.3 I have installed all ...
2
votes
0answers
123 views

Wordpress API returns empty page when page is less than X-WP-TotalPages

I am querying in the Wordpress API for all pages of media attachments. I am going page by page. I have about 5800 pages and when I hit pages 50-53 they return a blank or more of a [] but it is a ...
1
vote
1answer
354 views

How to convert this cURL to wp_remote_*?

My function below includes a cURL call which throws a text string at a Google Cloud text analysis API, returning a response object, which we then parse to get a specific piece. It has been ...
0
votes
1answer
628 views

mysqli_query(): MySQL server has gone away for Curl Request

I have created a WordPress Plugin which after activating shows result in jquery Datatable. We are fetching the result via CURL Post. The Post URL is a ASP.Net Application on Windows Server. The plugin ...
0
votes
0answers
24 views

Where is the location header?

When I curl a page of mine, I notice that it is moved permanently to... itself: PS C:\Users\Ooker> curl -I xn--qucu-hr5aza.com/page/2 HTTP/1.1 301 Moved Permanently Server: nginx Date: Wed, 21 Aug ...
0
votes
1answer
464 views

wp_remote_get - cURL error 28 - only on same domain

On my website I use wp_remote_get to fetch data from mydomain.com/wp-json/wp/v2/pages/75 When I run it on my localhost it works fine, but after sending to production server (mydomain.com) suddenly I’...
0
votes
2answers
3k views

How to send a HTTP Post request using PHP Curl and Wordpress

I am working on a script to bring in an xml file from another server via Post request, This would then return another xml of data which I can then store into a wordpress database depending on certain ...
0
votes
1answer
140 views

AJAX error handling for submit function in functions file

I have created a custom function in my functions.php to handle form submissions for a Mailchimp subscriber list. I am making an AJAX call in my JavaScript to process the PHP. The problem I am facing ...
6
votes
1answer
2k views

cURL 28 error after switch from to brew php 7.2 on localhost

I've been running into trouble with all my localhost install of Wordpress reporting cURL error 28 (timeout) since (I believe!)I've switched my PHP version from 7.0 to 7.2 with brew on my local Mac OS ...
0
votes
0answers
447 views

Contactform7: display results from CURL

I am stuck into a problem. I sent contact form data through curl and I get a response from an API. How is it possible to display there results on my page? Ideally through AJAX and in my own custom ...
0
votes
1answer
3k views

Add media with WP-Rest-API v2 II

I am having this exact question, asked in 2015, about adding media through the WP REST API. My code so far: curl -s -X POST http://www.example.com/wp-json/wp/v2/media/ -H "Content-Type: ...
0
votes
2answers
431 views

Download file using cURL into wp-includes/uploads

I have a save post hook that looks like this, it should download youtube thumbnail to wp-includes/uploads base on video id provided. But it doesnt save anything. add_filter( 'save_post', function () ...
0
votes
0answers
746 views

Post to WordPress API using cURL and login cookies

I want to post from one WordPress install [SiteA] to another [SiteB] using the http API and cURL. I have found plenty of JS examples where the auth cookie is loaded into the browser, and then an AJAX ...
2
votes
0answers
606 views

Create a Wordpress post using curl comand from Linux console?

Is it possible to create a Wordpress page or post with a curl command from Linux console? I tried using the available REST API, but for some reason can't figure it out. If you could give me an ...
1
vote
0answers
30 views

PHP to Handle API Return instead of print

My API End point has return statement instead of print or echo : e.g. return json_encode($data); instead of print json_encode($data); I have a curl caller to consume my API. When I try to display ...
0
votes
1answer
1k views

SOAP Request/Parsing XML From wp_send_json_success

I'm developing a cURL and AJAX SOAP request to grab XML/WSDL data. The request is effectively grabbing the data I want and I am using wp_send_json_success(); to manipulate the response. The response I ...
0
votes
2answers
546 views

Use WP admin AJAX url to hide API key

Currently I am using AJAX to request a simple JSON response from an external API. The problem is, that the API key is exposed. I'm aware the best method is to process this through admin-ajax and set ...
1
vote
2answers
13k views

cURL - How to send and fetch data in Wordpress

BACKGROUND After the user on domain1 clicks a link to domain 2, I need to send also the user-data (username,email,..) from server1/domain1 to server2/domain2 and to save it temporary in the server2/...
0
votes
0answers
226 views

Update products with curl (bash)

So i have a plugin that dose half the work, so i told my self why not make a bash file that can do that for me? with cronjob BUT the problem is that the Update part of my bash "script" is doing ...
1
vote
0answers
494 views

Curl requests sent two times

i've an issue with my curl request and i think it's coming from wordpress, i'm using wordpress to push data using curl & an API here is an example of curl method : public function pushtest() { ...
0
votes
1answer
4k views

REST API works in browser and via AJAX but fails via cURL

I'm using a WordPress REST API to get contents of a page. The URL I'm using is: https://sitename.org/wp-json/wp/v2/pages/4322 When I open that URL in browser, I'm getting back valid response. ...
-1
votes
1answer
462 views

How to send user data from one website to another

I need to send user data (some parts of user and user_meta), from Website A to Website B (both are Wordpress Websites) over a secure Protocol, after clicking on a button. According to this post, a ...
1
vote
1answer
3k views

Where Does Wordpress Make cURL Requests? How To Add cURL Option

I have been getting this error when trying to install plugins: Installation failed: Download failed. cURL error 18: transfer closed with 2126 bytes remaining to read. I have found a solution on how ...
1
vote
0answers
688 views

XML-code sent via the POST method to the URL (API) [closed]

I am building a webshop for a client who makes use of drop shipping service. The customer can place the order on the website and the order will be send to the dropshipper automatically. This is done ...
1
vote
1answer
166 views

How can i get the post's full html source by its ID?

Is there a way that i can get the HTML source of a single post dynamically from within WordPress site? for example, if i wanted an external html I would use: file_get_contents($url) or using cUrl, ...
2
votes
0answers
135 views

Login WordPress website using wp-rest api

I am using WordPress 4.8 and i am new to rest api . I have 2 websites , one is www.example.com and second is www.example.com/site2. That is second website is installed inside the first . In example....
4
votes
1answer
2k views

Creating a post with the REST API, curl and oauth returning 401 error

I'm trying to create a WordPress post using the REST API, OAuth, and cURL. However, I'm running into some trouble. I'm able to create a blank post (no title, slug, etc) using the following code: $...
1
vote
1answer
2k views

How to send file by wp_remote_post?

I don't want cURL in my WordPress plugin Hi, cURL is not safe to use on WordPress site. And sometime, cURL has been disable on customer hosting. And i decided to use wp_remote_post to send file for ...
0
votes
1answer
453 views

Installation problem with wordpress xampp

I have installed wordpress in my xampp server. everything looks great. I am using proxy so i have added below snippet in wp_config.php to use proxies. /* Configure proxy Server */ define('...