![]() |
|
![]() |
|||||||||||
![]() |
![]() |
||||||||||||
|
Using Contributed by: Bill Humpries This method simply opens the journal URL, and then prints the content. Explanation This method uses fopen() to open the journal URL, and then uses fpassthru() to pass the journal content to stdout. <?php
$journalURL = "http://www.blurty.com/".
"customview.cgi?username=username&styleid=101";
if ($fh = fopen($journalURL,"r")) {
fpassthru($fh);
} else {
echo "<p>Unable to load journal.</p>\n";
}
?>
Using Contributed by: Elliot Schlegelmilch This method is slightly different, and may work even if URL fopen wrappers aren't enabled on your server. Explanation This method uses <?php
$fp = fsockopen("www.blurty.com", 80, &$errno, &$errstr, 30);
if($fp) {
fputs($fp,"GET /customview.cgi?".
"username=username&styleid=101 HTTP/1.0\n\n");
while(!feof($fp)) {
echo fgets($fp,128);
}
fclose($fp);
}
?>
Using Contributed by: Jay Cuthrell This method is useful for those that want a line by line parse of their journal, with line number references.Explanation This method uses the <?php
$page = "http://www.blurty.com/customview.cgi".
"?username=username&styleid=101";
$content = file($page);
$slurp = "";
while (list($foo,$bar) = each($content)) {
$slurp .= $bar;
}
echo $slurp;
?>
Using Contributed by: Jon Parise This simply includes the journal page inside of the PHP page. Note This requires you have URL fopen wrappers enabled (they're on by default in PHP 4). <?php
include "http://www.blurty.com/customview.cgi".
"?username=username&styleid=101";
?>
* |
| © 2002-2008. Blurty Journal. All rights reserved. |