Is there anyway to unlock a locked iPhone?

I haven't touched my old phone in a good 3 months and I completely forgot my passcode. Is there absolutely anything I can do to get into it without a passcode? I wanted to restart and sell the phone but I can't get into it.

1. See if your carrier offers unlocking. Only your carrier can unlock your iPhone.
2. Contact your carrier and request an unlock. You might need to meet requirements to qualify for unlocking. After you submit the request to your carrier, it might take a few days to complete. Contact your carrier for the status of your unlock request.
3. After your carrier confirms that your iPhone unlock has been processed, go to the next section.

If you have a SIM card from a carrier other than your current carrier, follow these steps:
1. Remove your SIM card and insert the new SIM card.
2. Complete the setup process.

If you don't have another SIM card you can use, follow these steps to complete the process:
1.Back up your iPhone.
2. When you have a backup, erase your iPhone.
3. Restore your iPhone from the backup you just made.

I think connecting it to iTunes might help. I know that if you disable it long enough (1 min, 5 min, 15 min, etc.) it makes you connect to iTunes to validate