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 8664687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:18:03+00:00 2026-06-12T17:18:03+00:00

Hi i have a problem with the curl. I watched an old post Remote

  • 0

Hi i have a problem with the curl. I watched an old post Remote Login not Working With Curl, but it not work. I followed baba’s advice but the code enter in the if statement. Sorry for my bad english. Can anyone help me?

This is the code:

$url="http://hipfile.com/";
$urllog="http://hipfile.com/login.html"; 

$postdata = "login=bnnoor&password=########&op=login";

$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL, $url); 
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 
curl_setopt ($ch, CURLOPT_TIMEOUT, 60); 
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt ($ch, CURLOPT_REFERER, $urllog); 

curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); 
curl_setopt ($ch, CURLOPT_POST, 1); 
$result = curl_exec ($ch); 

if (!$result) { 
    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); 
    curl_close($ch); // make sure we closeany current curl sessions 
    die($http_code.' Unable to connect to server. Please come back later.'); 
} 
 echo $result;  
 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-06-12T17:18:05+00:00Added an answer on June 12, 2026 at 5:18 pm

    You have cookies off for starters. It seems like the site may require them when you login.
    The following function is pretty handy for me, the verbose option will display detailed curl
    errors and the ‘post’ option can be set to a post string or an associative array of values
    with the key being the variable/field name with it’s value. I also noticed your missing some
    post variable from the form on hipfile, this might also be a reason they are denying your
    login.

    fetch('http://www.hipfile.com/');
    $options['post'] = 'login=bnnoor&password=########&op=login';
    $options['verbose'] = true;
    $logged_in_page = fetch('http://www.hipfile.com/login.html',$options);
    

    Simple Curl function:

    function fetch( $url, $z=null ) {
        $ch =  curl_init();
        $useragent = isset($z['useragent']) ? $z['useragent'] : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2';
    
        curl_setopt( $ch, CURLOPT_URL, $url );
        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
        curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
        curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
        curl_setopt( $ch, CURLOPT_POST, isset($z['post']) );
    
        if( isset($z['post']) )         curl_setopt( $ch, CURLOPT_POSTFIELDS, $z['post'] );
        if( isset($z['refer']) )        curl_setopt( $ch, CURLOPT_REFERER, $z['refer'] );
        if( isset($z['ssl']) )          curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
        if( isset($z['ssl']) )          curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
        if( isset($z['verbose']) )      curl_setopt( $ch, CURLOPT_VERBOSE, true );
        if( isset($z['get_header']) )   curl_setopt( $ch, CURLOPT_HEADER, true );
        if( isset($z['header']) )       curl_setopt( $ch, CURLOPT_HTTPHEADER, $z['header'] );
    
        curl_setopt( $ch, CURLOPT_USERAGENT, $useragent );
        curl_setopt( $ch, CURLOPT_COOKIEJAR,  'cookiejarfilepath' );
        curl_setopt( $ch, CURLOPT_COOKIEFILE, 'cookiejarfilepath' );
    
        $result = curl_exec( $ch );
        curl_close( $ch );
        return $result;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm having an weird problem, my project have a login page, that's working, but
I want to get data using CURL but I have a problem. When I
I have problem SIMILAR to preventing form data reposting, but not quite the same
I have a small problem with php curl post. I am trying to post
I have a problem logging onto a page and then using it with cURL.
Heres my problem, I'm web developer and I have a web based script(PHP/CURL/HTML/JS) that
Here is my problem. I have a ticket-tracking system that is not very 'user
I have folowing problem. I use curl for downloading images from server. I generating
I have a strange problem with PHP and cURL using windows. If have a
I have this strange problem parsing XML document in PHP loaded via cURL. I

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.