Toilet flange conundrum
Check out some of the fittings and repair parts from Oatey. Not sure what sizes of pipe you have. But if you have a 4 inch pipe, 43539 is supposed to slide inside of it. It has a rubber piece that expands using 3 socket cap screws.

Link to Oatey site product page for the fit inside, expanding rubber flange


I have been repairing my own toilet bend, which is a lead piece coming from a cast iron drain stack. I would have used that part above, but I think I'm going to go with a 3x4 repair flange instead because this non expanding flange was shorter and fit better. The "3x4" part means it will fit over a 3" pipe or fit inside a 4" pipe. 



I hope this helps, every toilet flange problem is different. I had to buy many of the repair parts and test fit them before I found the right piece.