#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Convert PHP to ASP please :)


    Hello, and thank you for taking the time to assist me. I am currently looking for a nice simple jquery captcha that is either point and click, or drag and drop. I keep running into PHP though.

    So im hoping someone is kind enough to help me convert this to VB.

    PHP Code:
    if($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['captcha']) && $_POST['captcha'] == $_SESSION['captcha'])
        {
            echo 
    "Passed!"/* YOUR CODE GOES HERE */ 
            
    unset($_SESSION['captcha']); /* this line makes session free, we recommend you to keep it */
        

    elseif(
    $_SERVER['REQUEST_METHOD'] == "POST" && !isset($_POST['captcha']))
        {
            echo 
    "Failed!";
        }
    /* in case that form isn't submitted this file will create a random number and save it in session */
    else
        {
            
    $rand rand(0,4);
            
    $_SESSION['captcha'] = $rand;
            echo 
    $rand;
        } 
    Thank you again for your time
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,111
    Rep Power
    9398
    "Assist" and "help" are the key words here. Most of the time we'll convert something... for a fee.

    But what you have is short. Edit your post to put the code all on one line (delete what you have, copy/paste the code into the post, select it, and then hit the button) and we'll be able to read it.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0
    Edited as requested, I was hoping it was a quick and painless.

    Ill keep in mind gratuity when I need something scary
  6. #4
  7. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,111
    Rep Power
    9398
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0
    Originally Posted by requinix
    Oh: Classic ASP or ASP.NET?
    Forgive me for not being more specific.

    Asp.net

    /bow

IMN logo majestic logo threadwatch logo seochat tools logo