View Full Version : Manipulating Page within a page
Nigel
06-20-2005, 07:30 PM
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."
No.
You can use a frame or iframe to display a page, but it will be in its own font, with its own styling.
Nigel
06-20-2005, 08:12 PM
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"><?php
include("http://www.interactiverates.com/rates.html?custid=3945"); ?>
</SPAN></FONT></P>
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
// 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;
?>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.