Basically, you can download all required deb packages from this URL (I assumed that you are using 16.04 64 bits).
https://launchpad.net/~ondrej/+archive/ubuntu/php/+build/16264601
To know which packages to download, you can use this command to display all php7.0 packages installed on the server.
dpkg -l | grep php7.0
Copy the files on to an USB drive, mount the drive on the offline server, and then use the following command (don't use dpkg):
apt install ./php7.1_vvv.deb ./php7.1-common_vvv.deb ./php7.1-mmm_vvv.deb ...
Replace vvv by the version and mmm by module name, use tab to use the auto-completion. Here an example with php7.1 and mysql.
apt install ./php7.1_7.1.26-1+ubuntu18.04.1+deb.sury.org+1_all.deb ./php7.1-common_7.1.26-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ./php7.1-mysql_7.1.26-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb