/* If I use following to parse xml from external site on local:
-----------------
$xml = simplexml_load_file("http://www.feedsite.com");
-----------------
there is following warning:
Warning: simplexml_load_file() [function.simplexml-load-file]: php_network_getaddresses: getaddrinfo failed: No such host is known.
*/
Solution:
Step-1) Use Curl to fetch all xml into your local page:
Problem: XML Parsing Error: no element found. Means you are restricted to access it directly on local.
Solution: You might need to use proxy [ might be "wp-config" or directly "in curl" because in independent curl page does not include wp config)
For Curl:
curl_setopt($ch, CURLOPT_PROXY, "http-proxy.com"); //your proxy url
curl_setopt($ch, CURLOPT_PROXYPORT, "80"); // your proxy port number
For wp-config:
define('WP_PROXY_HOST', 'http-proxy.com');
define('WP_PROXY_PORT', '80');
Step-2) Then include that page into simplexml function:
$xml = simplexml_load_file("http://www.feedsite.com");