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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:31:58+00:00 2026-06-06T15:31:58+00:00

I found this code in the internet and I modified it for my use,

  • 0

I found this code in the internet and I modified it for my use, I’m not sure what I’m doing wrong here, I’m getting this error
Curl error: SSL connection timeout
The login part is successful, but the search isn’t working with me. can somebody help me with it please?

<?php
//create array of data to be posted
$post_data['username'] = 'user';
$post_data['password'] = 'log';
$post_data['cmd'] = 'log';

//create array of data to be posted
foreach ( $post_data as $key => $value) {
    $post_items[] = $key . '=' . $value;
}
//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);
//create cURL connection
$curl_connection =
  curl_init('https://sie.com');
//set options
///curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 3990);

curl_setopt($curl_connection, CURLOPT_USERAGENT,
  "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");

curl_setopt($curl_connection, CURLOPT_HTTPHEADER, array(
    'Connection: Keep-Alive',
    'Keep-Alive: 300'
));

curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result = curl_exec($curl_connection);
//show information regarding the request

//print_r(curl_getinfo($curl_connection));
//echo curl_errno($curl_connection) . '-' .
  //              curl_error($curl_connection);
//close the connection
//curl_close($curl_connection);


echo $result."\n";


$post_data1['cmd'] = 'Viewr';
$post_data1['search'] = 'test';



foreach ( $post_data1 as $key => $value1) {
    $post_items1[] = $key . '=' . $value1;
}
$post_string1 = implode ('&', $post_items1);
echo $post_string1."\n";
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT,
  "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result1 = curl_exec($curl_connection);
//show information regarding the request
//$result1 =1;
//close the connection
//curl_close($curl_connection);
if ($result1)
echo "ok \n\n";
else
echo "nok\n";
if(curl_errno($curl_connection))
{
    echo 'Curl error: ' . curl_error($curl_connection)."\n";
}
echo($post_string1);
echo $result1."\n";


curl_close($curl_connection);


?>
  • 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-06T15:32:01+00:00Added an answer on June 6, 2026 at 3:32 pm

    Try adding this (But don’t leave this option set in production!):

    curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
    

    If it works afterwards, it is because CURL is failing to negotiate the SSL Certificate.

    Follow this tutorial for steps on how to obtain the CA cert: http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

    Something else to look into is, before your curl_exec(), curl_copy_handle(); and then set additional parameters.

    Additionally, or alternatively, you could re-initiate cURL with curl_init($url);.

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

Sidebar

Related Questions

This is some code I found on the internet. I'm not sure how it
I found this code over the internet but am unsure about how to use
I have found this line of MatLab code on the internet that displays a
Hi i have problem with this code, i found it on the internet and
I found some mapkit code on the internet that looks like this: - (void)recenterMap
I found this code on the internet on how to to display message/pop up
I found this code in internet. I complied it and it executes fine. Then
I've got this code from an example I found useful around Internet. It uses
This code works. It's based on some code I found on the internet. Can
I found this code on internet : Class Book{ Public: void operator()(int Counter) const

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.