Skip to main content

Questions tagged [curl]

The tag has no usage guidance.

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

What is different about using admin-ajax.php in an endpoint and just submitting a form from the front end?

I have created an endpoint with the following php code. The code is currently allowing me to receive the correct pdf but none of the information from the $page is populated in the pdf. The $page is a ...
holty07's user avatar
0 votes
1 answer
73 views

cURL running slow in Wordpress

I have the following code in one of my Wordpress page templates: $url = "https://xxxxxxxxxxxxxxx/"; $headers = array( 'Accept: application/json', 'Content-Type: application/json', ); $...
user1448031's user avatar
0 votes
0 answers
41 views

After upgrading WordPress, I am getting the following error. Error message: cURL error 52: Empty reply from server

I had WordPress version version 6.4.4 (as best I can recall) and upgraded to version 6.5.3.That seemed to go well. I then started to upgrade the networks. It got the 4th one and thru the following ...
Mike's user avatar
  • 1
0 votes
0 answers
100 views

Using wp_mail to send attachment from a file stream content

I am using wp_mail to send mail with attachment. The attachment is not stored anywhere. The attachment contents are fetched viacurl request. This is what I wrote. This function below (...
sariDon's user avatar
  • 265
0 votes
0 answers
86 views

Trouble Sending Elementor Form Data via cURL in WordPress

I'm adapting the code to retrieve information from the Elementor form. I've referred to the documentation, and I have an example code snippet. function send_custom_webhook( $record, $handler ) { ...
Diane Rendel's user avatar
0 votes
1 answer
63 views

504 Gateway Time-out error when making cURL request in WordPress

I'm encountering a 504 Gateway Time-out error when attempting to make a cURL request in a WordPress environment. I've included the relevant code below: function welkvoxapi() { $curl = curl_init(); ...
Diane Rendel's user avatar
0 votes
0 answers
26 views

register_rest_route, Compare purchase codes and send a response

I have a question, I would be grateful if someone could help me I am working on WordPress plugins, I have 2 files, the first file is Verification which is for users and the second file is the ...
pooyan golkar's user avatar
0 votes
0 answers
1k views

How to run cronjobs in WordPress on docker

I am running a WordPress site in a docker container. The site works but the cronjobs do not run so I downloaded crontrol to get a GUI into crontab so I could confirm that the jobs existed and I see ...
steve8094's user avatar
1 vote
0 answers
229 views

Blocking the direct access to images in the upload folder WordPress

To prevent direct access for images in upload folder we have following configuration in Nginx configuration: location ~* \.(jpg|jpeg|png|gif)$ { valid_referers example.com https://example.com; ...
DevTeam's user avatar
  • 11
0 votes
1 answer
71 views

cURL request to plugin repository fails 403

I am trying to update a file in my plugin by getting the original contents from the wordpress repository via cURL The URL is of the format https://plugins.svn.wordpress.org/(plugin)/trunk/includes/...
Steve's user avatar
  • 297
1 vote
1 answer
1k views

How to use the HTTP API (wp_remote_get) instead of cURL?

I'm running into a problemen while trying to change my cURL request into a request using the HTTP API. Below code is my (old) cURL request. Here I'm getting some contents from an external URL. This is ...
DeltaG's user avatar
  • 899
0 votes
1 answer
73 views

Get single item from cURL plugin API call inside bash [closed]

I'm trying to get only the last_updated date from a plugin through an API call in a bash script. I'm trying to use cURL but that's giving me some issues. On the browser I can get to to plugin like ...
ecotechie's user avatar
0 votes
0 answers
172 views

Using file_get_contents within admin but keep logged in

Quick question as I'm not having much luck finding an answer on Google. I'm running a file_get_contents in a plugin I'm building to get the HTML of another page within the admin. The HTML is showing ...
ValhallaSkies's user avatar
0 votes
1 answer
563 views

cURL External API request displays content above other content on page

I've built a plugin to display our customer feedback on our WordPress website. We use an external feedback system called 'Customer Thermometer'. They have a simple API to use a URL to request stats ...
John Emmett's user avatar
1 vote
1 answer
1k views

How to convert this cURL to wp_remote_get?

I want to convert curl to wp_remote_get. $url = 'https://accounts.google.com/o/oauth2/token'; $curl_post = 'client_id=' . $client_id . '&redirect_uri=' . $redirect_uri . '&...
Yogesh's user avatar
  • 11
0 votes
0 answers
69 views

Curl error while creating user

I have a problem when trying to create users with authentication via plugin: "application passwords" curl -X POST --user "applogin:y530 8Uf9 OMSW sSsR Q0S8 zaqS" "http://...
Graig's user avatar
  • 3
1 vote
1 answer
153 views

File Type Is Not Permitted - Cronjob

I am currently developing a cron job that downloads a xml file from an external source and stores it within wordpress media. For debugging proposals, I have installed the plugin Advanced Cron Manager, ...
Basti's user avatar
  • 63
1 vote
0 answers
269 views

export a csv file from the database with a cronjob

I'm using an event plugin, which doesn't have a user-friendly function for showing a list of bookings. That's why I wrote a php+js script myself to display that data in a nice way. But to use my own ...
mathiflip's user avatar
0 votes
1 answer
3k views

Call external API in wordpress based on user input

I want to create a simple wordpress website in which I want to display a search box on a page. On searching a string in text/search box, an external API call should be made based on that string and ...
Vyom's user avatar
  • 3
0 votes
0 answers
162 views

CURL error with REST API

Having a very odd behavior. Using site health plugin; I was getting errors with CURL & Loopback. At any rate, I fixed both these issues on the server; however, it appears that other websites (also ...
Tamer Ziady's user avatar
0 votes
0 answers
243 views

Getting Download failed. cURL error 28: Connection timed out after 10001 milliseconds

I'm trying to install some external plugins that came with my theme and I can't see to find a way to get the communication to work properly. I also have this issue being reported when trying to start ...
Vast's user avatar
  • 1
1 vote
1 answer
1k views

How to create a post using REST API with sending data as a JSON body?

I am able to create posts on my WordPress website using it's REST API with the below curl request format. Website uses basic auth plugin for the authentication process. curl --user "username:...
Priyantha Buddhika's user avatar
1 vote
1 answer
567 views

Wordpress curl timing out and saying 'Moved Permanently'

I tried updating to wordpress 5.6 and it did not work. I tried installing a plugin for offline updates and the plugin install gave the same error: Download failed.: cURL error 28: Connection timed out ...
user avatar
0 votes
1 answer
251 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 ...
Morgan's user avatar
  • 137
0 votes
1 answer
2k 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 ...
Pezholio's user avatar
  • 101
1 vote
0 answers
894 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 ...
omarhabeh's user avatar
1 vote
1 answer
250 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 ...
jprice92's user avatar
  • 111
2 votes
0 answers
14 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 ...
Craig Stelter's user avatar
0 votes
0 answers
544 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 ...
user avatar
2 votes
0 answers
3k 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 ...
John's user avatar
  • 21
2 votes
1 answer
1k 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 ...
sialfa's user avatar
  • 319
0 votes
1 answer
684 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, ...
MikeiLL's user avatar
  • 579
0 votes
0 answers
207 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-...
BBBBB86's user avatar
  • 23
0 votes
1 answer
734 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. ...
user avatar
1 vote
2 answers
3k 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 ...
Yana Gushlevskaya's user avatar
2 votes
0 answers
682 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 ...
Kyle Calica-St's user avatar
1 vote
2 answers
2k 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 ...
Robert Andrews's user avatar
0 votes
1 answer
2k 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 ...
vanurag's user avatar
  • 111
4 votes
1 answer
3k 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’...
Seba's user avatar
  • 41
0 votes
2 answers
7k 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 ...
user1348927's user avatar
0 votes
1 answer
1k 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 ...
user13286's user avatar
  • 217
6 votes
1 answer
3k 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 ...
kontur's user avatar
  • 162
0 votes
0 answers
934 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 ...
user161783's user avatar
1 vote
1 answer
11k 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: ...
Brethlosze's user avatar
0 votes
2 answers
1k 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 () ...
Jirka Kastan's user avatar
0 votes
0 answers
1k 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 ...
John Dee's user avatar
  • 503
2 votes
0 answers
2k 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 ...
Radoslav Stefanov's user avatar
1 vote
0 answers
52 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 ...
Shrinath Shetty's user avatar
0 votes
1 answer
2k 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 ...
zqhmagic's user avatar
0 votes
2 answers
1k 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 ...
scopeak's user avatar
  • 213