Questions tagged [curl]
The curl tag has no usage guidance.
102
questions
0
votes
0
answers
27
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 ) {
...
0
votes
0
answers
28
views
Integrating Elementor Form Fields with WordPress cURL for External API Data Submission [closed]
I'm working on a WordPress project where I've implemented a custom function using cURL within functions.php to send data to an external API upon form submission. However, I'm facing challenges in ...
0
votes
1
answer
20
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();
...
0
votes
0
answers
20
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 ...
0
votes
0
answers
200
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 ...
0
votes
0
answers
12
views
Authorization and execution of the link
I'm connecting a custom payment gateway to the "Paid Member Subscriptions" plugin. I already have the payment process ready and redirected to the payment operator's website. After ...
0
votes
0
answers
167
views
wp_remote_post vs curl to send data in Wordpress plugin
I have this curl code and is working as intended. This code contacts my server:
$curl = curl_init();
$post_data = array();
$post_data[] = "plugin: $plugin";
$post_data[] = &...
1
vote
0
answers
87
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;
...
0
votes
1
answer
49
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/...
1
vote
1
answer
927
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 ...
0
votes
1
answer
61
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 ...
0
votes
0
answers
126
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 ...
0
votes
1
answer
428
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 ...
1
vote
1
answer
940
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 . '&...
0
votes
0
answers
58
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://...
1
vote
1
answer
142
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, ...
1
vote
0
answers
197
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 ...
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 ...
0
votes
0
answers
125
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 ...
0
votes
0
answers
213
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 ...
1
vote
1
answer
145
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:...
1
vote
1
answer
448
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 ...
0
votes
1
answer
222
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
0
answers
2k
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
1
answer
1k
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 ...
1
vote
0
answers
851
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
1
answer
192
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 ...
2
votes
0
answers
13
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
0
answers
501
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 ...
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 ...
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 ...
0
votes
1
answer
508
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
0
answers
197
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
1
answer
651
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. ...
1
vote
2
answers
2k
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
0
answers
630
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
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 ...
0
votes
1
answer
1k
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 ...
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’...
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 ...
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 ...
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 ...
0
votes
0
answers
858
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
1
answer
10k
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
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 () ...
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 ...
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 ...
1
vote
0
answers
49
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
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 ...
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 ...