adyrox
11-11-2009, 09:57 PM
Hey,
I'm developing a light weight social network that will run on anything that can access the internet.
Here is what i have thought of so far:
<?
define("IN_NETWORK",true);
include 'inc.php'; // include all frameworks and classes
$display->page('home',$_GET['media_type']);
?>
the AJAX can be either JSON or XML but polling is definatly not user friendly if we're talking cell phones/mobiles/mobile broadband etc
if(!is_defined("IN_NETWORK")){ die("ERROR 403"); // check no one is calling code out of network
if($_SESSION['userid'] OR !is_empty($_GET['action']){
// check for user id and make sure action isnt empty
switch($_GET['action']){
case "tick":
// grab buddy list and update the current user's online timestamp
break;
}
}
?>
the above code is what AJAX IM uses (or a rough version of)
the reason for this thread is your everyone's opinion on social networks and how much bandwidth they cost us all
Ady
I'm developing a light weight social network that will run on anything that can access the internet.
Here is what i have thought of so far:
<?
define("IN_NETWORK",true);
include 'inc.php'; // include all frameworks and classes
$display->page('home',$_GET['media_type']);
?>
the AJAX can be either JSON or XML but polling is definatly not user friendly if we're talking cell phones/mobiles/mobile broadband etc
if(!is_defined("IN_NETWORK")){ die("ERROR 403"); // check no one is calling code out of network
if($_SESSION['userid'] OR !is_empty($_GET['action']){
// check for user id and make sure action isnt empty
switch($_GET['action']){
case "tick":
// grab buddy list and update the current user's online timestamp
break;
}
}
?>
the above code is what AJAX IM uses (or a rough version of)
the reason for this thread is your everyone's opinion on social networks and how much bandwidth they cost us all
Ady