SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: curl advice

  1. #1
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    curl advice

    Hi,

    I am new to curl and need to send private confidential data via a url to another site. What curl features should be used to make sure the connection is as secure as possible as i will be receiving private information back from the url i'm sending the data too.
    So far I have:
    Code:
    $conn = curl_init();
    curl_setopt($conn, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($conn, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, 1);
    curl_setopt($conn, CURLOPT_URL, 'https://www.example.com?card=444555677");
    curl_setopt($conn, CURLOPT_HEADER, false);
    curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
    $data = curl_exec($conn);
    curl_close($conn);

    p_l

  2. #2
    SitePoint Addict
    Join Date
    Sep 2007
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use post method, instead of get. Other then that you're already using SSL.

  3. #3
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I should just use post instead of get and everything else is as secure as possible?

    p_l

  4. #4
    SitePoint Addict
    Join Date
    Sep 2007
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by p_l View Post
    So I should just use post instead of get and everything else is as secure as possible?

    p_l
    Yes, as far as i can see, it is.

  5. #5
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •