Can I get a PhD online? I know one can get a Bachelors degree online. Can one do the same with a PhD (I refer to fields which don't need specialized equipment like Math or CS, for example). 

At first glance, it should be easier since your doing almost independent work (you don't really need tests).

Are there such programs?
Most PhD programs that I am aware of have "residency requirements"—that is, you must be registered at the university and in general physically present in the department for some period of time. However, most PhD advisors that I am aware of in disciplines in which people can "work remotely" do allow their students to "telecommute" if necessary. For instance, if a spouse gets a job far away from campus, and daily commutes are no longer a realistic option. 

That said, the idea of a purely online PhD strikes me as highly unlikely to work out—because the nature of a PhD is fundamentally different from a bachelor's, in that it is a research degree, not a coursework degree. You are learning to become an independent researcher, and I don't think the online format translates well to that goal. There's too little direct interaction with other researchers. You'd definitely be independent, but there's no guarantee that you'd learn how to do research.