Elektro14:
I've been told that they've finished this project before but they used PHP request to get the data if i'm not wrong. But the cons using PHP request is when the connection lost they don't get the whole data. I mean the temp-humidity data is not complete. That's why they asked me to try using the FTP with esp8266.
Did you mean "HTTP request"?
FTP and HTTP are both based on the underlying TCP protocol. If you lose the connection when the download is 50% complete, you've only received the first half of the file, regardless of the protocol. That's not a valid reason to use FTP over HTTP.
There's nothing to stop you from using FTP of course, but it's easier to use HTTP, and you can use the built-in web server libraries.
Elektro14:
And SD card is used so they could save the data for a long term because esp8266 flash memory itself is not that big.
Hope I could get the idea how to do it.
Modern ESP8266 dev boards like the NodeMCU and WeMos D1 mini, and newer modules like the ESP-12 have 4 megabytes of flash storage, of which you can use up to 3MB for data storage.
Let's say you want to store a timestamp, a temperature value and a humidity value as comma separated values. A UNIX timestamp is 10 characters wide, depending on how you round the values, the temperature will probably be 4 or 5 characters ("##.##" format) and the humidity 1, 2 or 3 characters. You'll need two separators (e.g. a tab '\t' or a comma ','), and a carriage return + line ending.
The total size of one entry will be about 10+5+3+2+2 characters, or 22 bytes. 3MB = 3145728 bytes, divide that by 22 bytes, and you end up with 142,987 entries. (Ignoring all overhead caused by the file system.)
Let's say you take one measurement every ten minutes. That means that you have enough space for 1,429,870 minutes, or well over 2 years. That's more than enough time to move the gathered data to a server or computer.
If you save the data in a binary format (8 bytes for the timestamp + 2*2 bytes for the values), you could do even better, but you could corrupt all data if you have a framing error.
Of course, there are advantages to an SD card as well, like easy data recovery if the ESP would crash.
Like Gdsports mentioned, you can use the ESP to write to the SD card directly, you don't need an Arduino. It's even easier, because you can connect the SD card to the ESP directly, without any level shifters or additional ICs etc, because they both run at 3.3V.
gdsports:
I would use the following hardware. One is an ESP8266 board the other is a datalogger board with SD card slot and battery powered real time clock.
If the ESP has access to the Internet, you can use NTP to get the time, and you won't really need a real time clock. If you want maximum redundancy, you could always add a RTC module just in case the Internet is down for more than a day or so (but how likely is that, and even if it does happen, it's probably not that big of a deal if the time drifts a couple of seconds per day anyway).
Pieter