so need retrieve xml public api, app in flash , public service won't implement crossdomain.xml file. found php script online (below) proxy request url. works fine urls like: http://mysite.com/xml_proxy.php?url=http://rss.cnn.com/rss/cnn_topstories.rss but script seems either strip or ignore arguments on url, like: http://mysite.com/xml_proxy.php?url=http://publicapiserver.com?app_id=35235x&app_key=84x i'm php ignorant. there easy way have script process url arguments? much. here script: <?php $post_data = $http_raw_post_data; $header[] = "content-type: text/xml"; $header[] = "content-length: ".strlen($post_data); $ch = curl_init( $_get['url'] ); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_timeout, 10); curl_setopt($ch, curlopt_httpheader, $header); if ( strlen($post_data)>0 ){ curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_postfields, $post_data); } $response = curl_exec($ch...
Comments
Post a Comment