Using Arduino to program at89s51
The AT89S51 is an 8051 architecture microcontroller, not an AVR architecture microcontroller like the Arduino and (as normally expected by) it's ecosystem of programmers.

However


The AT89S51 supports serial programming using an SPI interface (MISO,MOSI,SCK,Reset)
People claim to have used avrdude (and progasp172) to program an AT89S51 (ref)


If I am right, any Arduino running the ArduinoISP sketch should be usable, in conjunction with avrdude, to program an AT89S51. 

Probably not very many people have tried this. 

There are numerous inexpensive ISP programmers that are known to avrdude or which emulate a programmer known to avrdude. For example, I've used both an Arduino and a bus-pirate to program a bare ATtiny85 on a breadboard. An unrelated but useful description here

That leaves you with the job of generating a binary file for your target microcontroller.