Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1048059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:23:52+00:00 2026-05-16T16:23:52+00:00

I am calling a login script on the server using http call from iphone.

  • 0

I am calling a login script on the server using http call from iphone.
the script returns a string “Invalid” or “valid” based on given username/pswd.

Here is what I am using:

NSString *myurlstr = [[NSString alloc] initWithFormat:@”http://www.mysite.com/iph/login.aspx?username=%@&password=%@“,uname,pswd];
NSString *resultstr = [NSString stringWithContentsOfURL:[NSURL URLWithString:myurlstr] encoding:NSUTF8StringEncoding error:&error];

NSLog(@”HERE IS THE ONE: %@”,resultstr);

Here is what the Console log prints:

TestingTrying[51514:207] HERE IS THE ONE: Invalid Login/Password

!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>

html xmlns=”http://www.w3.org/1999/xhtml” >

head>title>
Untitled Page

/title>/head>

body>

form name=”form1″ method=”post” action=”login.aspx?username=abc&password=abc” id=”form1″>

input type=”hidden” name=”__VIEWSTATE” id=”__VIEWSTATE” value=”/wEPDwUJNzgzNDMwNTMzZGTnVSKZt+HQfSlQeCketelC9X+47A==” />

div>

/div>
/form>
/body>
/html>

Can someone help on how to get the string only(Invalid Login/Password) and not the content that starts from DOCTYPE onwards?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:23:52+00:00Added an answer on May 16, 2026 at 4:23 pm

    If your simply asking how to get the first line from your server response, use a tokenizer. This should point you in the right direction, just use new line which is /n from memory as the delimiter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help. I am calling the login function from another class, //
I have an Employee class object that I am calling from my Login.aspx page's
Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using
I use this Facebook Login Button code: <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js></script> <script> FB.init({ appId
I call ant command in my ruby script (on Windows XP) using %x[]. I
The Facebook Graph API code I am using to login users is calling my
I have the following snippet below from my script that's using a WebRequest to
I need to call javascript function from Flash 4 based web application. When I
In a Action, I am calling RedirectToAction(login, new { test = 1 }); And
I am Calling an Applet Class After Login. The form is Visible but the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.