1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help urgently please!

Discussion in 'General Programming Chat' started by themob, Jan 16, 2014.

  1. themob

    themob BANNED BANNED

    Joined:
    Jul 28, 2013
    Messages:
    376
    Likes Received:
    40
    if I have a php with a button that will make any person that push it to interact with another website (Site A have a button in a script that will make a visitor to go on site B and interact to the login system of site B) how can I make the php script to get the response after the login is done on site B (I have no control over site B and I can capture this process using fiddler on my computer...I need to make a php script that will do the same but hosted on a server not on the users computer as fiddler... how can I do it?)?

    PS: I will really appreciate your help or I will pay for that script.
     
    Last edited: Jan 16, 2014
  2. themob

    themob BANNED BANNED

    Joined:
    Jul 28, 2013
    Messages:
    376
    Likes Received:
    40
    when somebody click on a button, it generate some http requests . and will redirect to a page . before redirect that page, i want to save that http requests into a database or a file .. do you know ?
     
  3. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    75
    Not possible.. unless I'm not understanding what you mean. You can't login from domain A to domain B if domain B isn't yours and it doesn't allow cross-origin requests. Meaning you can't get whatever you request from domain B from domain A. It's for security reasons.
     
  4. themob

    themob BANNED BANNED

    Joined:
    Jul 28, 2013
    Messages:
    376
    Likes Received:
    40
    Yes it's possible . I know a website and when you click on 'OK' button you will be redirected.. i want to save all http requests between click 'OK" and redirect to that new page into a file
     
  5. Bokva

    Bokva Regular Member

    Joined:
    Jan 26, 2010
    Messages:
    201
    Likes Received:
    110
    Occupation:
    Graphic and Web design
    Location:
    Underground
    I suppose button is provided from site B as a script to be put on site A, so user of site A click on it and go to "mother" site B to provide login info?
     
  6. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    75
    I don't understand what you mean when you say "all the requests between OK and redirect". What would that be?
     
  7. mypmmail

    mypmmail Junior Member

    Joined:
    Jan 31, 2008
    Messages:
    111
    Likes Received:
    27
    When you click on "OK", you can submit to your own site, capture the request, then redirect to the other site.

    Say, you own a site that has a payment page to be sent to paypal.
    But you want to capture the order information before sending to PP.

    What you will do is to submit the form to current site, capture the order information, then redirect to PP.

    Generally, in this type of case, you will also sent PP some information in format required by PP, so that they can sent the visitor back to you after they are done with whatever.

    If the information are security related, then usually some form of backend communication between your server and the other server is required, else the information on the other server will not be trusted.
     
  8. themob

    themob BANNED BANNED

    Joined:
    Jul 28, 2013
    Messages:
    376
    Likes Received:
    40
    What I want exactly is if you know to create a script for me when a visitor click button to redirect him to a page then to save the next 2 link addresses that will use that visitor on their browser?
     
    Last edited: Jan 17, 2014
  9. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,155
    If the browser changes to a domain you don't have control of, you can't grab any data. As people already told you, google "same origin policy".
     
  10. ChrisX

    ChrisX Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 8, 2011
    Messages:
    229
    Likes Received:
    124
    Gender:
    Male
    Home Page:
    Send the request to your own php file. In that file save everything you need and forward the same request to the original target. That is, if you have control over the button and its target. If not, perhaps a javascript hack could work (i.e. dynamically change the target of the button)
     
  11. Pornguy

    Pornguy Regular Member

    Joined:
    Nov 29, 2012
    Messages:
    320
    Likes Received:
    106
    Home Page:
    Can you better explain what you mean? So a user clicks a button that does something on another site, logs into their site or whatever does not matter. But before it redirects them to that site, what do you want it to do? What information are you looking to save? IP address of person clicking the button? Login information? What?
     
  12. uyuyuy99

    uyuyuy99 Junior Member

    Joined:
    Jul 10, 2012
    Messages:
    129
    Likes Received:
    107
    Location:
    U.S.
    ^ Something like this would work. Check out site B and see what file processes login information - e.g. site-b.com/login.php - and that should be the file you redirect the info to.

    Also, if I were to hazard a guess, I'd say you're trying to make a phishing site? :p