If you want a 6iv ditto, there are two methods you can use:
Trade
That should be pretty obvious. It's a shiny - so bear that in mind as it will be popular!
Breed
The catch is that the sixth IV is always random, so the best way of trying to get your hands on a 6IV is having some 6IV parents kicking about.
Don't have any 6iv parents? Well try two 5IV parents who are missing a 31 in the same stat...
It's all a fluke and down to the luke of the draw, but this seems to nudge things in your favor.
Also if you are trading, please beware of scammers as I have been burned on Facebook by someone who wanted to trade a pokemon I spent ages breeding.