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

  • SEARCH
  • Home
  • 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 5943303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:22:34+00:00 2026-05-22T16:22:34+00:00

I try to submit login form with phpcommand: curl, but it doesn’t work. The

  • 0

I try to submit login form with phpcommand: curl, but it doesn’t work.
The fields form are two: email and psw.
The problem is that if I use urlencode to field email it return the error: “incorrect format email!”, while if I not use the urlencode there aren’t response.

This is the code without urlencode:

$url = 'myurl';
$fields = array(
        'login_email'=> 'myemail@gmail.com',
        'login_passwd'=> 'mypsw',
    'remember_me' => '1'
    ); 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // Return page in string
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,$fields);
$page = curl_exec($ch);
echo $page;

//close connection
curl_close($ch);
  • 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-22T16:22:34+00:00Added an answer on May 22, 2026 at 4:22 pm

    Are you sure there’s no response? Many login systems simply do a redirect to some other page if the login is successful. Try adding

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    

    which’d let CURL obey the redirect and fetch whatever page the server’s sending you off to.

    Alternatively, you can use the CURLOPT_HEADER option to include the HTTP headers in the response returned into your $page value and see what’s going on there.

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

Sidebar

Related Questions

How can I submit jQuery form object (not ajax)? I try form.submit() and it
I have a rails form with a datetime_select field. When I try to submit
i have a form with 2 fields username: password: and a submit button. the
I try to curl a page with a javascript submit process with out any
I am working on using prototype to submit a simple login form: http://huddlee.homeip.net/danny/ For
I have a form with a hidden submit button. When I try to submit
I am getting a conversion error every time I try to submit a date
I am having a problem when trying to login.. below is my code for
I'm trying to redirect the user if they login successfully but the code I
ok here is the situation , I want to use a login form for

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.