Just a guess: Wikipedia may be checking the HTTP request headers and rejecting requests when certain headers ('user-agent', perhaps?) are missing or have certain values that indicate to it that it's a script and not a "live" user request. If this is the case, you may need to use cURL and send the necessary headers.