If you've recently removed malware or any trojans from your computer, your Winsock may be corrupt, and may need to be repaired.
If this is the case, try the software download from this URL:::::::
WinSock XP Fix download and review - fix XP internet connectivity from SnapFiles
If nothing else you've tried works, just try this software, its worth a shot. But only IF nothing else works.
Also, check to see if your firewall is allowing the specific program your trying to use access to the internet. If it says it is, try turning off your firewall temporarily and then try to access. After you find out if its the firewall or not, turn it back on.
Borgslayer