According to the law, temporary residents in China have to register with the police within 24 hours of arriving in-country. Unless you're staying at a hotel, this requires going to your nearest police station, waiting in line, and filling out a form. It's not hard, it's just inconvenient. With the launch of the "Self-Help Declaration System For Overseas Personnel's Accommodation Registration," that's a thing of the past. SmartShanghai: minimizing your contact with the fuzz since 2005! Here's how to register online with the police.

Step 1: Log In To The Website

Step 2: Fill In Your Details

Step 3: Wait For Processing

Step 4: Download Your Registration Form Of Temporary Residence

Here's the link: Self-Help Declaration System For Overseas Personnel's Accommodation Registration . This website is only valid for people registering at an address in Shanghai. Assuming you don't have an account, make one. It takes two seconds and doesn't require an email verification (but you might want that email for later).Next step is to fill in your info, once you click off the thoughtful "you don't need to register if you stay in a hotel" tip. This might be the most foreign user-friendly website the government has ever made.Just upload an image of the photo ID page in your passport. It'll pick the details out automatically, but you can add or correct anything that wasn't right.Don't mind the "with your certificate" bit, just upload a passport photo or a clean, passport-style selfie. I did it at my desk.The address system is a slight pain in the butt, owing to the interminable difficulty in translating sometimes complex Chinese address into English ones. Do your best. Trust us. We know all about that Note: the "Date of Departure" info doesn't appear on your final certificate, just put the last date you left China. [Now you just wait!Processing can take five to ten minutes. [] You'll get an email confirmation when it's done, and it might show up in your spam folder.Back on the website, select the QR code that's replaced the "processing" bit and you'll have the option to "preview" (download), email or share a PDF of your form, with chop, filled in for you. Magic!Whoops. Sorry, officer! Next time I will!