If you want something closer than what the browser does, use the URL Loading System:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html

Le 27 oct. 2009 à 16:35, James Lin a écrit :

The sticky point right now is: the same url string used with stringWithContentsOfURL works perfectly when accessed using a browser.
Which means my php script is in perfect working order.

But when accessed using stringWithContentsOfURL, then it doesn't work!

I can tell my ISP is not going to take up the responsibility for this one, because it works in a browser...

That's why i am asking for alternatives to stringWithContentsOfURL...

James
On 2009/10/27, at 下午11:25, Roland King wrote:


On 27-Oct-2009, at 11:16 PM, Dave Carrigan wrote:


On Oct 27, 2009, at 8:11 AM, James Lin wrote:

Hi all,

I am still having the mysterious error of "Internal Error 500" message returned from stringWithContentsOfURL.

If "Internal Error 500" is the contents of the string after you create it using +stringWithContentsOfURL, then the problem is with the server, and changing to use something else is not going to change that fact.



Exactly. You need to go find out what is being sent to the server when you use that method and why it's erroring. You're missing a parameter or you encoded something wrong or there's a cookie you need to set or something. There is nothing wrong with the cocoa method, you're either not setting it up right, or you need to add more stuff or it's possible that the request does need things that stringWithContentsOfURL: can't add, but at this point you haven't figured that out and don't know what, if anything they are, so no other method will help you.

The error log from the server would be of use.

HTTP is simple. Look at what you're sending out with some kind of snoop between your non-cocoa way and your cocoa way, the answer lies there.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org

This email sent to devli...@shadowlab.org


-- Jean-Daniel




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to