How to get a hidden value

Discussion in 'PHP' started by hip_hop_x, Dec 2, 2007.

  1. #1
    How to get the hidden value without submiting the form?
    
    <input type="hidden" name="ses" value="31e1e6a5bd37483a62f04d73d4ff5ac2">
    Code (markup):
    That value is random, and on each refresh is changing.

    With pregmatch will be possible? If so, how?
     
    hip_hop_x, Dec 2, 2007 IP
  2. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #2
    and how is the random value generated? while generating it, you can store it in a session variable.
     
    legend2, Dec 2, 2007 IP
  3. hip_hop_x

    hip_hop_x Active Member

    Messages:
    522
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #3
    that's the problem because I don't know how it's generated.
     
    hip_hop_x, Dec 2, 2007 IP
  4. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #4
    you're not the script owner? the value isn't just generated out of nowhere you know:)
     
    legend2, Dec 2, 2007 IP
  5. hip_hop_x

    hip_hop_x Active Member

    Messages:
    522
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #5
    What if I'll do this:
    <?php
    $site="link.com";
    $content=file_get_contents($site);
    echo $content;
    echo "<a href='document.form.submit()'><b>Click</b></a>";
    ?>
    PHP:
    On click will submit the data, right?
     
    hip_hop_x, Dec 2, 2007 IP
  6. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #6
    so you're basically fetching a 3rd party webpage right?
    In that case you can't do much. try appending a javascript code which fetches the input's value. but then, what do you want to do with it?
     
    legend2, Dec 2, 2007 IP
  7. hip_hop_x

    hip_hop_x Active Member

    Messages:
    522
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #7
    well, I wanted to do some things automatic using cron jobs, but didn't work because that website is checking for referral. Atleast I got the concept on how works, thanks allot for help.
     
    hip_hop_x, Dec 2, 2007 IP
  8. krampus

    krampus Active Member

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    88
    #8
    I'am not sure how that value get on page... usually that hidden field and that kind of values (md5) is used to protect forms of some attack... the right question is... why do you need that value?
     
    krampus, Dec 2, 2007 IP
  9. hip_hop_x

    hip_hop_x Active Member

    Messages:
    522
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #9
    I wanted to generate the page myself, from my server. Anyway, the thing doesn't work as I've planned, so I can't do what I wanted.
     
    hip_hop_x, Dec 2, 2007 IP
  10. Xexi

    Xexi Well-Known Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    100
    #10
    Why not post what you want to do and maybe we can help you? :)
     
    Xexi, Dec 3, 2007 IP