[isf-wifidog] Publishing/Syndicating UserList?

Rob Kelley rob at robkelley.net
Mar 19 Jan 12:35:41 EST 2010


I've managed to do it pretty easily with jQuery:
http://papermashup.com/use-jquery-and-php-to-scrape-page-content/

In short, it's two files, the main index.html with the javascript and
a little three line php file that uses curl to suck in the source
page.

CURL.PHP

<?php
$ch = curl_init("[NODE PORTAL PAGE]");
$html = curl_exec($ch);
echo $html;
?>

INDEX.HTML:

<html>
<head>
<!-- include wifidog stylesheets -->
<link rel="stylesheet" type="text/css"
	href="https://[AUTH_SERVER]/media/base_theme/stylesheet.css">
<link rel="stylesheet" type="text/css"
media="print"	href="https://[AUTH_SERVER]/media/base_theme/printer.css">
<!-- include jquery -->
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
<!-- comment out wifidog js files, they don't seem needed
/*
<script src="https:///[AUTH_SERVER]/js/formutils.js"
type="text/javascript"></script>
<script src="https:///[AUTH_SERVER]/js/addEvent.js"
type="text/javascript"></script>
<script src="https:///[AUTH_SERVER]/js/menu.js"
type="text/javascript"></script>
*/ -->
<!-- kick off the loading of the external page via curl.php, filter
down to the three divs -->
<script type="text/javascript">
$("document").ready(function() {
  $("#content").load("curl.php #online_users, #recent_users, #active_users");
});
</script>
</head>
<body>
<div>
    <h1>User List</h1>
        <div id="content"><img src="ajax-loader.gif" alt="Loading..." />
        </div>
</body>
</div>
</html>

Rob


On Fri, Jan 15, 2010 at 12:00 PM, <wifidog-request at listes.ilesansfil.org> wrote:
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 15 Jan 2010 09:48:24 -0500
> From: Rob Kelley <rob at robkelley.net>
> To: wifidog at listes.ilesansfil.org
> Subject: Re: [isf-wifidog] Lot WiFiDog, Vol 60, Parution 4
> Thanks Genevieve for your help.
>
> I agree an API is the elegant right way to do it.
> http://dev.wifidog.org/wiki/WifidogAPI
>
> In the short term, I'm guessing it's going to call for an ugly hack.
> With the templates and sub-templates, I'm getting pretty confused.
> How can a webserver request just the HTML generated by "UIUserList"?
> For the record, you don't need to authenticate to see this info right
> now, it's there on the portal page if you know the link (feature, not
> bug):
> http://bit.ly/inthehouse
>
> Any pointers?
>
> Thanks again.
>
> Rob
>
>  ---
>
> _______________________________________________
> WiFiDog mailing list
> <a class="moz-txt-link-abbreviated"
> href="mailto:WiFiDog at listes.ilesansfil.org">WiFiDog at listes.ilesansfil.org</a>
> <a class="moz-txt-link-freetext"
> href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a></pre>
> </blockquote>
> Hi Rob,<br>
> <br>
> I'm not really sure there is a straightforward way to pull that info
> out of the server right now, but we are in the process of adding some
> way to get information out of the server, for use by an external
> plugin.&nbsp; More precisely, a team is developing an API for WordPress that
> will get information out of the server and display it on the Wordpress
> site.&nbsp; It should be released early this year.<br>
> <br>
> The functionnality you are looking for may be in that API and while I
> don't have much information on how this Wordpress API will work, it may
> or may not use the new in-development wifidog external API described in
> this page <a class="moz-txt-link-freetext"
> href="http://dev.wifidog.org/wiki/WifidogAPI">http://dev.wifidog.org/wiki/WifidogAPI</a>.<br>
> <br>
> More on that soon...<br>
> <br>
> <div class="moz-signature">-- <br>
> Genevi&egrave;ve Bastien
> </div>
> </body>
> </html>
>
>
> ------------------------------
>
> _______________________________________________
> WiFiDog mailing list
> WiFiDog at listes.ilesansfil.org
> http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
>
> Fin de Lot WiFiDog, Vol 60, Parution 5
> **************************************


Plus d'informations sur la liste de diffusion WiFiDog