How to download a file in ASP.Net?

First  & Simple Way of Downloading Asp.Net File   There’s are few lines to download a file Asp.Net.    Response.ContentType = “application/msword”; Response.AppendHeader(“Content-Disposition”, “attachment; filename=AnyFile.doc”); Response.TransmitFile(Server.MapPath(“~/MyFiles/AnyFile.doc”)); Response.End();   First you need to mention content type.   For example , if we want to download .doc… Read More

How to Get real client IP address in PHP

On website we often need IPaddress  of visitor  for reason like  validation, security , span prevention.  Simple way to get IP address in php is using $_SERVER[‘REMOTE_ADDR’] or  $_SERVER[‘REMOTE_HOST’]  variables.$_SERVER create an array on web server and we can use it in php. $ipaddress = $_SERVER[‘REMOTE_ADDR’]… Read More