Is this possible?

Discussion in 'PHP' started by WeedGrinch, Feb 18, 2010.

  1. #1
    If I iframe a website that has a signup form, and under the iframe (on my webpage), could I put a button/link that would "submit" the form that is in the iframe?

    Sorry if this doesn't make much sense... Basically trying to do what people do for CPA Co-Reg offers.
     
    WeedGrinch, Feb 18, 2010 IP
  2. georgiivanov

    georgiivanov Member

    Messages:
    62
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    25
    #2
    You can access the IFrame using Javascript and thus submit the form there.
     
    georgiivanov, Feb 18, 2010 IP
    WeedGrinch likes this.
  3. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #3
    If the form in the iframe is coming from another domain, no. Browser security will prevent access to the framed document.
     
    joebert, Feb 18, 2010 IP
    WeedGrinch likes this.
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,903
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #4
    In which case use curl to snatch the code and present the other form as if it comes from your site. then you can use the javascript.
     
    sarahk, Feb 18, 2010 IP
    WeedGrinch likes this.
  5. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #5
    Why not skip the cURL bit and just setup a copy of the form on your site then ?
     
    joebert, Feb 19, 2010 IP