show part of site using iframe

Discussion in 'HTML & Website Design' started by neteater, Dec 3, 2014.

  1. #1
    hi i am looking for some code or some wordpress plugin where i can show only some part of external website in iframe not the complete site, is it possible to achieve.
     
    neteater, Dec 3, 2014 IP
  2. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #2
    Not with an iframe alone. You would need to bring in the page and parse out what you don't want and then reformat the remaining part to insure you have a stable structure. You could manipulate and store the page in advance so you could server from your own server in an iframe. If it is dynamic then you could use AJAX to go across to a server side script and do the butchering real time, but if the source of the target page is slow you might look like you are hung.

    If host of the target page does not want you using their content that way they may block you, and if the content is copyrighted you could endup with legal problems if you do not have permission to use it. It is generall best to ask permission, and sometime you will find that there is an API available to do what you want.
     
    COBOLdinosaur, Dec 3, 2014 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,813
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #3
    Just create your own template incorporating the iframe
    Or create a plugin that uses a shortcode to create the iframe

    but even then you need to take the entire page. An iframe won't strip the page of the bits you don't want, like the masthead

    but, honestly, find a better way. Doing what you describe is pretty unethical
     
    sarahk, Dec 3, 2014 IP
  4. neteater

    neteater Well-Known Member

    Messages:
    734
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    105
    #4
    yep i know its sound criminal..but i am not cloning anything, anyways can you suggest some plugin or script which can overlay or cover part of page with blank screen and leave only a part of it visible, you can understand what i mean
     
    neteater, Dec 3, 2014 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,813
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #5
    I doubt there is one, you'll have to write your own.
     
    sarahk, Dec 3, 2014 IP
  6. neteater

    neteater Well-Known Member

    Messages:
    734
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    105
    #6
    i am good at modifying code but not able to write my own, i lack creativity.
     
    neteater, Dec 3, 2014 IP
  7. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #7
    It does not require creativity. It requires basic coding skills. If you do not have those then you need to invest some time in acquiring some mastery of the basics instead of relying on the work of others.

    Cd&
     
    COBOLdinosaur, Dec 4, 2014 IP
    sarahk likes this.
  8. neteater

    neteater Well-Known Member

    Messages:
    734
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    105
    #8
    its harsh..but still i feel afraid writing of code dont know why but i cant code from zero.
     
    neteater, Dec 4, 2014 IP
  9. Naina S

    Naina S Active Member

    Messages:
    203
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    93
    #9
    Iframes will show whole page. If you want to show a part of page, use some programming concept. In C# which i work with, i did it once by storing the whole source of an external page in a variable. I used streamreader class for it. So you can do it, remove unwanted area with a regular expression concept. THen show the variable value inside a div.
     
    Naina S, Dec 7, 2014 IP