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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:04:33+00:00 2026-05-26T11:04:33+00:00

I have a curl script which logs into a website that I wrote in

  • 0

I have a curl script which logs into a website that I wrote in PHP to accomplish a task.

The problem is I have to store my password in plain text in a PHP file as so curl can use it to login correctly.

Is there any way I could encrypt that password, so if anyone else ever got onto FTP or anything, that if they were to look at the file where it’s in they wouldn’t be able to read the password, however, curl would be able to read it and still use it properly?

Thanks!
M

  • 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-26T11:04:34+00:00Added an answer on May 26, 2026 at 11:04 am

    If you encrypt your password your curl script will have to decrypt it to use it as the password for your PHP task.

    To encrypt your password you will have to use an encryption key, also known as a password. You will need the decryption key stored so your curl script can decrypt the password used for your PHP, but now you’ve stored the password for decrypting the password.

    This is the problem that that all DRM (DVD encryption for example) runs into — you have to make the keys available to decrypt what you’re trying to protect, and you therefore compromise security.

    Your best bet to be secure is to have a driver “program” (could be a script or whatever) that interactively asks for a password and hangs onto it until it’s time to run the real job (your curl script in this case) at which time the driver can supply the password.

    Alternatives to be completely non-interactive are to keep the password like you are now, but maybe in a less available space than the source itself, or to use certificate authentication to negotiate a secure and trusted connection – which of course involves getting certificates from a Certificate Authority.

    Security is Not Easy.


    And I second the answer mentioned by Teofilo Israel Vizcaino Rodrig in the comments.

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

Sidebar

Related Questions

I have a PHP script that loads a function which uses Curl to log
I have a PHP script that uses CURL to fetch a remote page and
I have noticed that cURL in PHP returns different data when told to output
I have a script which calls an external API using curl. This script worked
Quick question : I have a PHP script which query Pinnacle Cart API through
I have a script with which I POST data to a server using cURL.
I have a PHP script that syncs data with a third party service, and
I have a script in PHP which retrieves two very similar files and performs
I have an ugly data entry task that needs automation. The problem is that
Here is my dilemma... I basically have a script which by means of CURL

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.