Create plugin/function to catch XML-data via Shortcode

If this file is remotely available to you, then you should be using the HTTP API. $response = wp_remote_request( ‘http://xml.prisguide.no/productExport.php?productId=151690’ ,array( ‘ssl_verify’ => true // If the request isn’t working, try it with `false` ) ); You then simply go and catch the response and check if it’s an error: if ( is_wp_error( $response ) … Read more

Using the wp_remote_post response body

Your question doesn’t make a lot of sense. The submission works but I get the returned URL as an HTML stream in $response[‘body’] but I cannot seem to get any query string values from it. That is what is supposed to happen. You requesting a web page just as when you click a link in … Read more

How to use wp_http with https-pages?

You will probably need to look at the sslverify argument and modify the plugin to use this. See the documentation http://codex.wordpress.org/HTTP_API The ‘sslverify’ argument was added in Version 2.8 and will check to see if the SSL certificate is valid (not self-signed, actually for the site in the request) and will deny the response if … Read more

How to receive JSON payload from a digital device

Your exact code would depend on how the HTTP notification is sent to your server and on the structure of the JSON, but the first building block is to listen for the incoming post request. There are lots of WP hooks that would be suitable. One is init, e.g.: add_action(‘init’, function() { $user=”the_correct_basic_auth_username”; $password = … Read more