Iphone 使用ASIHttpRequest登录网站

Iphone 使用ASIHttpRequest登录网站,iphone,asihttprequest,Iphone,Asihttprequest,我有一个网站,我想在我正在制作的iphone应用程序中从我的iphone登录,我遵循了ASIHttpRequests网站上的文档,但我从响应字符串中得到的只是登录页面的html代码,但我得到的是OK http代码,为什么会发生这种情况 这是我的密码: -(IBAction)fetchData:(id)sender { NSURL *url = [NSURL URLWithString:@"http://www.rssit.site90.com/login.php"]; ASIFormDataR

我有一个网站,我想在我正在制作的iphone应用程序中从我的iphone登录,我遵循了ASIHttpRequests网站上的文档,但我从响应字符串中得到的只是登录页面的html代码,但我得到的是OK http代码,为什么会发生这种情况

这是我的密码:

-(IBAction)fetchData:(id)sender 
{
NSURL *url = [NSURL URLWithString:@"http://www.rssit.site90.com/login.php"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request shouldPresentCredentialsBeforeChallenge];
[request setRequestMethod:@"POST"];
[request setPostValue:@"" forKey:@"username"];
[request setPostValue:@"" forKey:@"password"];
[request setDelegate:self];
[request startAsynchronous];

//Add finish or failed selector
[request setDidFinishSelector:@selector(requestLoginFinished:)];
[request setDidFailSelector:@selector(requestLoginFailed:)];




}

- (void)requestLoginFinished:(ASIHTTPRequest *)request
{

NSString *yourResponse = [request responseString];
NSLog(@"%@", yourResponse);
}

该页面上的表单正在执行get,而不是post。您的服务器可能不需要POST数据,而是查看查询字符串参数。改为
[NSURL URLWithString:@”http://www.rssit.site90.com/login.php?username=YOURUSERNAME&password=YOURPASSWORD"];


并将requestMethod设置为GET。

这不起作用,我的php中是否有我应该有的东西?