I'm trying to embed a live journal into a webpage of mine. So far, most of it's been easy. But there's one piece of it that has eluded me.
By using a line like
<?include "http://www.diary.com/script.cgi?username=username&styleid=1111"; ?>
You can pull down a chunk of html code to embed in your webpage. The problem is that all of the urls contained inside it are pointing back at the journal site, and I want to embed the whole darn thing so it runs completely inside my site. So I was directed to peek at ereg_replace, by someone with a little know how.
I did something similar to
<?
$string= include "http://www.diary.com/script.cgi?username=username&styleid=1111";
$string= ereg_replace('www.diary.com/script.cgi','www.mydomain.com/myscript.php',$string);
echo $string;
?>
Now, this actually WOULD have worked. But for one problem. Some of the HTML being served has " in it. I went into the journal site and changed manually, ALL of hte code I had the ability to change. No dice. Some of the code generated is out of my hands to change. So the "s are causing it to bomb. (For the record, I tested this theory by grabbing the long string of HTML generated and doing a manual search and replace in an editor, making the results hardcoded to be $string and ran it, it worked.)
So how does one ereg_replace a string to change " to ' when ereg_replace bombs out because of the "s in the string to begin with?
(I'm hoping that made sense)
Any suggestions, advice? Frankly, I'm at a loss.