목적 C :의 HTTPRequest를 - 내가 목표 C에서이 코드를 구현하기 위해 노력하고
- (IBAction)loginButton:(id)sender {
NSURL *loginURL = [NSURL URLWithString:@"http://www.website.com/forum/login.php?do=login"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:loginURL];
[request setRequestMethod:@"POST"];
[request setUseKeychainPersistence:YES];
[request addPostValue:[self.usernameField stringValue] forKey:@"vb_login_username="];
[request addPostValue:[self.passwordField stringValue] forKey:@"&vb_login_password="];
[request setDelegate:self];
[request setTimeOutSeconds:60];
[request startSynchronous];
[request setUseSessionPersistence:YES];
}
- (void)requestFailed:(ASIHTTPRequest *)request {
NSLog(@"Request failed: %@",[request error]);
}
- (void)requestFinished:(ASIHTTPRequest *)request
{
NSLog(@"Submitted form successfully");
NSLog(@"Response was:");
NSLog(@"%@",[request responseString]);
}
을하지만이 작동하지 않습니다
Public Shared Function Login(ByVal Username As String, ByVal Password As String) As Boolean
Dim str As String = Func.ConvertToHex(Username)
Http.GetResponse("http://www.website.com/forum/login.php?do=login", String.Concat(New String() { "vb_login_username=", str, "&vb_login_password=", Password, "&cookieuser=1&s=&securitytoken=guest&do=login&vb_login_md5password=&vb_login_md5password_utf=" }))
If Http.ResponseValue.Contains(("Thank you for logging in, " & Username)) Then
Http.GetResponse("http://www.website.com/forum/usercp.php")
Return True
End If
Return False
End Function
이 이미 한 일이다. 회신은 받았지만 회신은받지 못했습니다.
P. 그것은 vBulletin 포럼에 관한거야 나쁜 영어로 죄송합니다 ..
미리 감사드립니다!