Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. http post response id capture

http post response id capture

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
sysadmintools
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi, I am sending a HTTP post request to external url and if it is successfull - the client server returns OK:12345 on web page. Now 12345 is an id and this is what i need to capture and store it as a variable to be used in my second script. Is there any way i can save this id as a variable or something. Thank You.

    C 4 2 Replies Last reply
    0
    • L Lost User

      Hi, I am sending a HTTP post request to external url and if it is successfull - the client server returns OK:12345 on web page. Now 12345 is an id and this is what i need to capture and store it as a variable to be used in my second script. Is there any way i can save this id as a variable or something. Thank You.

      C Offline
      C Offline
      cjoki
      wrote on last edited by
      #2

      Sounds like cross site scripting which is a security issue and you will find hard to work around. You can use something like cURL to do it though.

      1 Reply Last reply
      0
      • L Lost User

        Hi, I am sending a HTTP post request to external url and if it is successfull - the client server returns OK:12345 on web page. Now 12345 is an id and this is what i need to capture and store it as a variable to be used in my second script. Is there any way i can save this id as a variable or something. Thank You.

        4 Offline
        4 Offline
        47_MasoN_47
        wrote on last edited by
        #3

        I agree with cjoki that this is cross site scripting. It's a pretty big security vulnerability to do such things and a lot of browsers (or security software/addons) will attempt to block it. However, do you have control over the 2nd server (i.e. can you set it up to send that id as a post back to your server?) If so I'd recommend doing that if you absolutely have to. If the OK:##### is just generated HTML I'm not sure how you would go about capturing that and storing it as a variable.

        L 1 Reply Last reply
        0
        • 4 47_MasoN_47

          I agree with cjoki that this is cross site scripting. It's a pretty big security vulnerability to do such things and a lot of browsers (or security software/addons) will attempt to block it. However, do you have control over the 2nd server (i.e. can you set it up to send that id as a post back to your server?) If so I'd recommend doing that if you absolutely have to. If the OK:##### is just generated HTML I'm not sure how you would go about capturing that and storing it as a variable.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          ok how about if the client side send a data via post to our site - On that page i have written a script to store post data in a text file. But this works internally when i try to send data via post method to that page but not externally.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups