Sessions across servers?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CK

    Sessions across servers?

    I'm try to implement a CATCHPA script on a server that doesn't have GD
    extension. So i'm calling a PHP script on another server to return the
    image. Only problem is I need to return a variable along with the
    image as below

    On server 1(Without GD)
    <img src="http:www.server1.com/image.php?
    width=100&heigh t=40&characters =5" />

    ON server 2(Image creation and security code scipt)
    ..........
    header('Content-Type: image/jpeg');
    imagejpeg($imag e);
    imagedestroy($i mage);
    $_SESSION['security_code'] = $code;
    ..........

    Script works fine if all files on server with GD extension, my only
    problem is getting back the "$_SESSION['security_code'] = $code;"
    variable?

    Thanks
  • Erwin Moller

    #2
    Re: Sessions across servers?

    CK schreef:
    I'm try to implement a CATCHPA script on a server that doesn't have GD
    extension. So i'm calling a PHP script on another server to return the
    image. Only problem is I need to return a variable along with the
    image as below
    >
    On server 1(Without GD)
    <img src="http:www.server1.com/image.php?
    width=100&heigh t=40&characters =5" />
    >
    ON server 2(Image creation and security code scipt)
    .........
    header('Content-Type: image/jpeg');
    imagejpeg($imag e);
    imagedestroy($i mage);
    $_SESSION['security_code'] = $code;
    .........
    >
    Script works fine if all files on server with GD extension, my only
    problem is getting back the "$_SESSION['security_code'] = $code;"
    variable?
    >
    Thanks
    Hi,

    No, you cannot easily share session between different servers.
    Unless you want to get into the detail of it, my advise would be to
    simply use recaptcha:


    Using that also:
    1) Makes sure your captchas are difficult enough, but readable
    2) Makes your captcha even work for visual disabled/impaired visitors
    3) You help translate books!
    4) Very easy to set up and use.
    5) public/private key logic implemented, so hackers/spammers will have a
    hard time.

    Regards,
    Erwin Moller

    Comment

    • CK

      #3
      Re: Sessions across servers?

      Nice, that will work well for me. Thanks.
      On 15 Jul, 17:38, Erwin Moller
      <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
      CK schreef:
      >
      >
      >
      >
      >
      I'm try to implement a CATCHPA script on a server that doesn't have GD
      extension. So i'm calling a PHP script on another server to return the
      image.  Only problem is I need to return a variable along with the
      image as below
      >
      On server 1(Without GD)
      <img src="http:www.server1.com/image.php?
      width=100&heigh t=40&characters =5" />
      >
      ON server 2(Image creation and security code scipt)
      .........
      header('Content-Type: image/jpeg');
      imagejpeg($imag e);
      imagedestroy($i mage);
      $_SESSION['security_code'] = $code;
      .........
      >
      Script works fine if all files on server with GD extension, my only
      problem is getting back the "$_SESSION['security_code'] = $code;"
      variable?
      >
      Thanks
      >
      Hi,
      >
      No, you cannot easily share session between different servers.
      Unless you want to get into the detail of it, my advise would be to
      simply use recaptcha:http://recaptcha.net/
      >
      Using that also:
      1) Makes sure your captchas are difficult enough, but readable
      2) Makes your captcha even work for visual disabled/impaired visitors
      3) You help translate books!
      4) Very easy to set up and use.
      5) public/private key logic implemented, so hackers/spammers will have a
      hard time.
      >
      Regards,
      Erwin Moller- Hide quoted text -
      >
      - Show quoted text -

      Comment

      Working...