Failed to Open Stream: Permission Denied While Writing to an XML File in a WordPress Plugin

Check folder permissions too. Also See this post http://www.php.net/manual/en/function.fopen.php#105465 – suggests he had to change to absolute from relative to get around error message. Set of debug suggestions here: http://www.wrensoft.com/forum/showthread.php?t=786 1) folder permissions 2) upper/lowercase 3) abs/relative path and finally it turned out to be an extra space somewhere,

Using WPDB to output raw XML fails because of wp-blog-header.php

Include wp-load.php, not wp-blog-header.php. Better yet, hook onto the execution of a standard WordPress request and die early. isset( $_GET[‘my_conditional_check’] ) && add_action( ‘plugins_loaded’, ‘my_xml_output’ ); function my_xml_output() { // do my stuff exit; } This’ll run WordPress, then my_xml_output(), then die before the request is actually parsed & the template is loaded/rendered: http://example.com/?my_conditional_check

Post processing of uploaded file

You can do this using the wp_handle_upload hook: http://adambrown.info/p/wp_hooks/hook/wp_handle_upload?version=3.4&file=wp-admin/includes/file.php Create a function and add it to this hook so it runs last, it will be passed an array. The array contains the location of the newly uploaded file: add_filter(‘wp_handle_upload’,’wpse_66775_handle_upload’,1000,1); function wpse_66775_handle_upload($args){ $filename = $args[‘file’]; $type = $args[‘type’]; // test if it’s an XML file and … Read more

RSS/XML of all Categories and/or Tags

Demo plugin for JSON export: I’m not sure the RSS feed structure suits your needs, for example taxonomies and terms don’t have any dates for the public date field. So here’s an example how you can retrieve all the terms for a given taxonomy: /** * Plugin Name: WPSE – JSON export all terms for … Read more

Widget with same content across several websites

for the idea of storing data on the provider webside, it’s a good idea but I recommend to use JSON onstead of XML. it’s a litte bit faster to parse and you will save a litte bit bandwith on the provider side, you can use the WordPress AJAX helpers to make somethig like that : … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)