In my opinion, the best way to do that would be:
Wash bottle with warm water.
Use a 2 liter drink bottle, cut above label (about 2/3rds the way up the bottle). Remove label from bottle, and turn the nozzle end around so that the last 1/3rd of the bottle (where you drink from) is now inside the larger part of the bottle. Affix smaller 1/3rd into larger 2/3rds by rubber-band. Drill a hole into cap JUST barely big enough for fry to get through, but make sure the adults can not fit. Put VERY LITTLE food (preferably sinking pellet/wafer of some sort rather than flake) in bottom of bottle and put bottle into tank. Remove the bottle daily, clean thoroughly with warm water and paper towel (DO NOT use soap/detergents on any product that will contact your tank or your skin before skin touches tank!), then replace food and bottle into tank.
The fry can still get out of the bottle if they want to, but if you put a few snipets of guppy grass/java moss (something with lots of hiding area such as those two previously mentioned) into the food end of bottle it would attract the fry to stay.