The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
11 views

Performing a curl request to Google Places API [closed]

I am trying to display business hours on a single post page using a Google API CURL Request. This worked outside of wordpress, but gets an "INVALID_REQUEST" error when in Wordpress. I added the ...
-1
votes
0answers
26 views

Transfer php value from another site to plugin

I want to get 2 php values from another site that I get via iframe from the wordpress plugin, to another file in the plugin. say 1 site uses iframe with file_of_my_plugin.php and get 2 php values, I ...
7
votes
3answers
120 views

Is it save to use sslverify => true for with wp_remote_get/wp_remote_post

I'm normally using this arguments with wp_remote_get and wp_remote_post array( 'sslverify' => false ); to prevent errors. For security reasons I would like to set it to true (or remove it ...
0
votes
0answers
23 views

Unable to connect to wordpress api

My friend have installed a 3.6 wordpress on a CentOS server. It cannot detect a newer version of wordpress that ask you to upgrade. So does the plugins and themes. Also, the oembed of YouTube failed. ...
0
votes
1answer
140 views

Accessing an API with jQuery and AJAX

As a proof of concept I'm trying to access an API using jQuery and AJAX and posting the results to a page. After following some online tutorials and doing my best to put it all together, I have the ...
0
votes
1answer
38 views

Does Wordpress perform better with curl installed?

Wordpress doesn't require curl but it seems to use it if it's available (see line 295). I'm guessing HTTP requests will perform better using curl or Wordpress wouldn't even try to use it. Is this ...
0
votes
1answer
167 views

Authentication over CURL

I am working on an API for a WordPress site. Basically, an external application (not made using WP) is able to send JSON to a file I made (api.php) and inside that file I load WP (using wp-load.php), ...
0
votes
0answers
71 views

Get full page HTML for a non-public Wordpress page

How can I write a function that will return the full rendered HTML of a non-public URL on my Wordpress site—a URL that you must be logged in to see, such as a draft? Not just the post content, but the ...
12
votes
2answers
636 views

I found this in a plugin. What does it do? is it dangerous?

I found this in a plugin. What does it do? is it dangerous? add_action('admin_enqueue_scripts', 'pw_load_scripts'); if (!function_exists('wp__head'){ function wp__head() { ...
0
votes
1answer
194 views

Error: Can´t access facebook comment plugin admin page

The plugin i'm talking about is facebook-comments-plugin The problem is i can´t access admin page: /wp-admin/options-general.php?page=fbcomments This error is happening: PHP Warning: ...
1
vote
0answers
700 views

Why is json_decode failing?

I'm trying to determine if this is related to my having the latest version of PHP on my server while using the latest version of Wordpress. Or if I'm just doing it wrong: Here's my function that is ...
0
votes
1answer
533 views

Build dynamic page from cURL (HTML page) response with plugin

I feel like I am missing something simple here, but can't figure it out I need to have my plugin build links to a page that is built entirely via a cURL response. I am building a plugin that ...
0
votes
0answers
71 views

Is it possible to make Wordpress as a RESTful app?

I'm planning to create a Wordpress plugin that accepts data via cURL and sends a JSON reply. The plugin will save the data in the database upon receive so there has to be some authentication and will ...
0
votes
1answer
207 views

calling admin-ajax.php from admin-ajax.php

I'm writing a plugin that calls the output of another plugin's ajax, which is set-up at wp_ajax_ I would have called the functions directly, but limitations in the plugin make that a non-option. To ...
4
votes
1answer
2k views

Passing .pem and .key files in cURL doesn't work in WordPress

I'm building a payment gateway plugin for woocommerce which requires sending an XML request via cURL, encrypted with private key. I'm using the following code: $xml_request ='<?xml ...
1
vote
1answer
988 views

wp_remote_get vs. file_get_contents vs. cURL?

I need to fetch the contents of a remote file. Which is better for performance - wp_remote_get, file_get_contents, or cURL? How exactly does wp_remote_get work? Can you suppress errors, ex. ...
3
votes
2answers
579 views

Re use authenticated HTTP connection or cUrl handle

We have a bespoke Wordpress plugin, which adds a meta box to the edit post page. The plugin accesses data from a semi-private HTTP REST API. The connection is authenticated (DIGEST) and accessed ...
2
votes
1answer
911 views

Retrieving Google Plus share count with wp_remote_post

So I've spent most of my morning working on my website's customized social share buttons. Reading out Twitter and Facebook shares were no problem, but Google Plus is a real challenge, as they don't ...
1
vote
1answer
350 views

On Plugin Activation, How Do I Check for Proper Transport Mechanism?

For a plugin that communicates with somewhere else, I hear we're supposed to use wp_remote_post and wp_remote_get instead of PHP's Curl library. Okay, but is there a fast and proper way on plugin ...
0
votes
1answer
4k views

Creating login session via CURL

Using the following code I experienced some problems: Login works but every link in the dashboard I will click will follow into the 404 not found page. It seems that there won't be a working session ...
1
vote
2answers
911 views

Upload to a remote server using wp_remote_post

I'am developing a plugin that will push files to a remote server via http upload. Currently I got it to work with CURL doing something like this: $post = array("post_file"=>"@/path/FILE.EXT"); ...
0
votes
2answers
343 views

WordPress Plugin: Where should I put my cookies for cURL?

Currently creating a plugin with cURL and I need a place that will work for most WordPress servers (Unix or Windows) to store my cookie file. Anyone have a suggestion or best practices? I've been ...
0
votes
4answers
512 views

curl problem or permalinks

I just configured my VPS, I am using Centos, everything works fine, but if I am setting my permalinks to Custom Structure, then accept the homepage none of the posts come, it shows me 404 page, I ...