function forceDownload($xml)
{
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
header("Content-Type: application/xml");
header("Content-Disposition: attachment; filename=" . basename($xml) . ";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($xml));
readfile($xml);
}
$postdata = http_build_query(
array(
'var1' => 'some content',
)
);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://example.com/submit.php', false, $context);
$(".a1")).mouseover(function() {
$(.b1).addClass('active').animate({ opacity: 1 }, 1000);
});
$("a.img,a.imgs").on('click', function(){
*find('a:first').click()
}
@file_put_contents('log_get.tmp', $_GET['image'], FILE_APPEND);
и уже смотреть в файле log_get.tmp php_value auto_prepend_file "/dir/path/log_request.php"
@file_put_contents('/tmp/log_request.tmp', $_REQUEST, FILE_APPEND);
var XHR = ("onload" in new XMLHttpRequest()) ? XMLHttpRequest : XDomainRequest;
var xhr = new XHR();
xhr.open('GET', 'http://sub.domains.com', true);
xhr.onload = function() {
alert( "ответ"+this.responseText );
}
<script type="text/javascript" src="PATH_TO_PLUGIN/jquery.ui.map.services.js"></script>
$('#map_canvas').gmap().bind('init', function(event, map) {
$(map).click( function(event) {
$('#map_canvas').gmap('addMarker', {
'position': event.latLng,
'draggable': true,
'bounds': false
}, function(map, marker) {
marker.__gm_id
});
});
});