Results 1 to 4 of 4

Thread: Manipulating Page within a page

  1. #1
    Join Date
    May 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Manipulating Page within a page

    I hope this makes sense. Is there a way, using html, to call up a url and get its contents to display in a desired font? If so, can any direct me as to where I can find such a "tag."

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No.
    You can use a frame or iframe to display a page, but it will be in its own font, with its own styling.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    May 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Embedded Font

    Thanks for the reply. Here is the twist: the url came from a script that was part of a PHP tag. When I displayed the tag in an editor, voila, the embedded html referencing the font size and style showed up. Since I dont know php and I know the font style and can display the url w/in a frame, I thought that using html I could somehow display it using html. Does this make sense?

    Eg: <?php include("http://www.interactiverates.com/rates.html?custid=3945"); ?>

    Displays as:
    <P class=MsoNormal><FONT face=Arial size=2><SPAN
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&lt;?php
    include("http://www.interactiverates.com/rates.html?custid=3945"); ?&gt;
    </SPAN></FONT></P>
    Last edited by Nigel; 06-20-2005 at 08:15 PM.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Argh. Wrote a reply to this, then closed the browser window. >.<

    The best way is to edit the include before putting it on the page, with PHP. Instead of <?php include('http://www.interactiverates.com/rates.html?custid=3945'); ?>, use:
    PHP Code:
    <?php
    // Include the page into a variable.
    ob_start();
    include(
    'http://www.interactiverates.com/rates.html?custid=3945');
    $inc ob_get_contents();
    ob_end_clean();

    /* Strip the head, doctype, &c. off it.  Change <body> and </body> to what the body and /body tags look like in the page (e.g. case differences). */
    $inc explode('<body>'$inc);
    $inc explode('</body>'$inc[1]);
    $inc $inc[0];

    // Replace desired style elements.
    $inc str_replace('HTML to replace''HTML to replace it with'$inc);
    /*
    Add more replace statements as desired.  If there are any single quotes (') in the HTML, you should put backslashes (\) before them, so they look like this: \'
    */

    // Output the product.
    echo $inc;
    ?>
    Last edited by Twey; 06-21-2005 at 10:52 AM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •