Jump to content

download and get user ip address


voip03

Recommended Posts

I am trying using ‘js’ but can tell me any better way.

<script type="text/javascript" >

function downloadPdf(el) {   

var iframe = document.createElement("iframe");   

iframe.src = "download.php";   

iframe.onload = function() {       

// iframe has finished loading, download has started       

el.innerHTML = "Download";   

}   

iframe.style.display = "none";

    document.body.appendChild(iframe);

}

</script>

<?

function call()

{

//get ip address...

echo "Downloading...";

}

?>

<a href="download.php"  onclick="this.innerHTML='<? call(); ?>'; downloadPdf(this);">Download</a>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.