The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
1answer
493 views

Using the wp_remote_post response body

I don't have great PHP skills, but can usually fumble my way through with a little bit of direction, so I'm hoping someone on here can help me. I am doing a http post submission from a form to a ...
0
votes
1answer
236 views

wp_remote_post tp paypal nvp api timeout, while curl with the same parameters work

I'm using wordpress Http Api to call this worked perfectly for over two years and just recently broke down. This is the code: $nvpreq = ...
0
votes
0answers
29 views

Error timed out with succesfull wp_remote_post

What I'm trying to do: Passing POST data by using wp_remote_post. foreach ( $articles as $article_id ) { $postarray = array( 'method' => 'POST', 'timeout' => 5, ...
0
votes
0answers
421 views

Redirect all page templates to index.php and turning Wordpress into a Single Page Application CMS

I’m trying to push the boundaries of Wordpress by turning it into a SPA CMS. Everything works fine until now except for a redirection issue. github angularpresstheme How it works: When I create a ...
2
votes
1answer
149 views

Connect external web app to wordpress

We have a web app that will allow users to edit their videos; and add intros, outros, and watermarks. Once the user already done on their video. We need to provide an option to post or syndicate ...
4
votes
4answers
665 views

How do I mock HTTP requests for PHPUnit?

I'm writing a plugin that makes requests to the Facebook graph API. As I don't want my unit tests to actually make these requests, how would I overcome this? My method calls both wp_remote_get and ...
0
votes
0answers
60 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 ...
5
votes
2answers
403 views

How to use WordPress HTTP API to download file from remote location

So this PHP code works for me: $ch = curl_init( TCS_CPDF_REMOTE_ZIP ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); $data = curl_exec( $ch ); curl_close( $ch ); ...
0
votes
1answer
37 views

http_response_timeout filter not working

I am writing a Wordpress plugin that makes calls to external sites. I want to raise the timeout for all wp_remote_* calls, so I added the following to the __construct function of my plugin: ...
0
votes
3answers
253 views

What's the best way to detect referrer?

I've been searching for some WP specific way to detect any referrer. Have an idea? I know how to do that in PHP but I just want to know if there's some WP function to do that? EDIT: here is what I 'm ...
0
votes
1answer
128 views

How to use wp_http with https-pages?

I'm trying to get content from an other site of mine, using iFrame-less Reloaded (http://wordpress.org/plugins/iframe-less-reloaded/) It uses the class WP_http but doesn't work with a page in https. ...
5
votes
1answer
488 views

Hook into WordPress update?

I'd like to know if there's any way to hook into WordPress update process and send $_POST variable to update server? I'm delivering plugin/theme updates from private server and I hook into this: ...
0
votes
1answer
123 views

Add information to HTTP Header in WordPress Plugin

I am working on developing a plugin for a tool called Supportify. It is a REST API that is authenticated through a key and token added to the HTTP header of a HTTP request to their servers. Their API ...
2
votes
1answer
1k views

API JSON Data in WordPress

On the Google developer API page, it talks briefly on retrieving a dynamic list of fonts using JSON/JavaScript. I was wondering how would I be able to pull the web fonts API into my Wordpress theme ...
1
vote
4answers
2k views

using wp_remote_get to retrieve own url on local host

I have a website in local development at test:8888 and I am trying to get the following to work in my functions.php file. $response = wp_remote_get( 'test:8888/?p=1' ); print_r($response); ...
2
votes
2answers
137 views

Is it possible to process $_POST / inbound http request in way to automatically create Wordpress post?

I like to learn some of WP automation. The WP get inbound http request to site url and the question is how to create a publication based on post (or get) data structure? How can maintain ...
1
vote
1answer
106 views

How deactivate the http-api

give it an tipp or solution for deactivate the method request() in class WP_Http_Streams? I use WordPress also on offline-servers and have wp_debug true for development and tests. But i have many ...
1
vote
3answers
231 views

Does WordPress's HTTP API use any caching?

I'm working on a plugin to will retrieve data from a remote server and display it on the Dashboard. To do this, I'll be using the WordPress HTTP API but I'm not seeing any information on the HTTP API ...
2
votes
1answer
274 views

Storing an XML Response (Transient)?

Haven't worked much with XML so I'm hitting a bit of a wall: function getapi() { $api_response = wp_remote_get( "http://example.com/getXML" ); $data = wp_remote_retrieve_body( ...
-1
votes
1answer
375 views

Create plugin/function to catch XML-data via Shortcode

I need to display data from an XML-file inside Wordpress posts, and I want to use shortcodes to do it. I have this XML-file witch I need to get the data from; ...
3
votes
1answer
2k views

How to use the HTTP API with a Proxy?

If I want to route a HTTP request through a local (alias: on the current server) Proxy, how would I go around this? The allowed Proxy settings for the wp-config.php are the following: # HTTP Proxies ...
5
votes
3answers
1k views

Filter any HTTP request URI?

I want to filter any HTTP request URI done through the HTTP API. Use cases: The WordPress update check goes to http://api.wordpress.org/core/version-check/1.6/, but ...
2
votes
1answer
2k views

Posting an XML request using HTTP API

I'm trying to work with an API that expects an XML string in the body of the post. Additionally, the docs for the API specify: Please post with mime-type text/xml with the XML in the body of the ...
3
votes
2answers
184 views

WP_Http_Cookie destroys cookie value through urldecode()

Background: Working on a Widget that uses a remote API using wp_remote_post to log into the service, once logged in storing the cookies received for the second request to query data with ...
1
vote
1answer
103 views

Inconsistent server code response using HTTP API

I'm using Wordpress http api to get a server response code from youtube api so I check the validity of a video. I do this in a function from my functions.php which processes my post form where I ...
2
votes
2answers
784 views

wp_remote_post with ssl:// protocol

$response = wp_remote_post( 'ssl://securesite.com', array( 'method' => 'POST', 'body' => $string, // variable is set 'timeout' => apply_filters( ...
3
votes
1answer
1k views

parse XML from URL (via SOAP)

I am attempting to build out a dashboard widget that will perform a validation check on a site RSS feed using the W3 Validator. Their API docs (http://feed2.w3.org/docs/soap.html) provide the method. ...
1
vote
1answer
1k views

POST to a REST API from a wordpress form

I dont want to use a REST API to publish to wordpress. I want to create a form on a wordpress page which will send a POST to an external REST API. Users will put in their information, and perhaps ...
10
votes
2answers
353 views

How to control accept encoding on HTTP API requests?

Related to this ticket about issues with inflating data. So far it had been suggested by API's support to request gzip instead of deflate. However I cannot find a way to override WP settings that ...
0
votes
2answers
189 views

Behind-the-scenes HTTP Request?

I'm trying to add a line to my functions.php that does a behind-the-scenes HTTP request submitting some user information to a mailing list URL I have. I'm trying to test the code at the moment, but ...
2
votes
2answers
346 views

What is the official way to consume the Wordpress API? (api.wordpress.org)

Was wondering if anyone knows here if the API at api.wordpress.org is free to use without keys. I haven't really found any information about key registration. I'd like to use it to make a few ...