Question: China visa requirements

can i enter shanghai airport PVG with onward tix to my next destination country (and proper visa for that country - thailand) and stay in shanghai for up to 48 hours without a visa?

can i enter shanghai PVG with a 30-day visa and no onward tix out of china (with intention & money to buy onward tix while in china)?

I look forward to your answers as I haven't had any luck with the chinese consulate answering their phones or returning voice or email messages.