how to prevent iframe from breaking out? please help!

Discussion in 'Programming' started by monkeyclap, Jan 7, 2010.

  1. #1
    hi, i've iframed a third party webpage on one of my pages, but what it does now is redirect my entire page to their website - is there any fix for this?

    thanks
     
    monkeyclap, Jan 7, 2010 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    yes its possible, could you post or pm me the url so I can advise you further.
     
    MyVodaFone, Jan 7, 2010 IP
  3. luckymurari

    luckymurari Active Member

    Messages:
    629
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    90
    #3
    As much as I know, the main site might be using framebreaker script and hence I believer there could not be any solution for this.
     
    luckymurari, Jan 7, 2010 IP
  4. Mail Propeller

    Mail Propeller Peon

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sorry if I misunderstand the question, but I think if you put the tag:
    <base target="_blank">
    in your head, it will do what you want.
     
    Mail Propeller, Jan 7, 2010 IP
  5. Mail Propeller

    Mail Propeller Peon

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    But that will make all links open in new windows/tabs. Sorry, it might not be the solution you are looking for after all.
     
    Mail Propeller, Jan 7, 2010 IP
  6. monkeyclap

    monkeyclap Active Member

    Messages:
    836
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    85
    #6
    will using php curl solve this? anyone help? please pm me, willing to pay for a good job.
     
    monkeyclap, Jan 7, 2010 IP
  7. luckymurari

    luckymurari Active Member

    Messages:
    629
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    90
    #7
    If the site you want to frame is just a static webpage, you can go about doing it. But, if its a dynamic page, then you require lot other things to do. PM me the details, I might be able to help you
     
    luckymurari, Jan 7, 2010 IP
  8. mycollection

    mycollection Peon

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    please post the solution here as well :)
     
    mycollection, Jan 7, 2010 IP
  9. monkeyclap

    monkeyclap Active Member

    Messages:
    836
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    85
    #9
    i've been told cURL may fix it, but am still in need of help!
     
    monkeyclap, Jan 7, 2010 IP
  10. PooraPagal

    PooraPagal Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Well as some said if the site you iframing has frame breaker then curl is the only way to grab info as monkeyclap said. to use curl obviously you need that on your server..
     
    PooraPagal, Jan 8, 2010 IP
  11. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #11
    well i think this cant be fixed iframe brakers are put on the external page whichis not in ur control
     
    Bohra, Jan 8, 2010 IP
  12. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #12
    Theres a javascript on the thirdparty website which is writing links to target="_blank", using curl you would have to find and replace that using preg_replace, pointing to your own amended javascript.

    It would be time consuming to offer further free help. Try the BST section under Programming for the best price.
     
    MyVodaFone, Jan 9, 2010 IP