downloading int with php and unity

I am trying to download an int from a MySQL database but everything that I try the number won’t be correct. I tried to download it in a string and then convert it, did not work. I tried to convert byte[] to int but I got a totally different number. how can I do this in the correct way?