Quote:
Originally Posted by Andreweb
Ok ! I hope that your eye will be fine ! 
|
Eye is great

Sorry I did not make it basck here as planned. My daughter graduated from College (UMKC) yesterday. When I said I would be back I had kind of forgotten that that was going on.
I am back today though and trying to figure out what all to tell you about this stuff.
Camfoxes was originally created as an example of an xml driven site in answer to someone's question.
Simple Chaturbate XML Example is the original incarnation just showing a simple xml parse and display of the chaturbate models.
This is the code that is in there:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Simple Chaturbate XML Example</title>
<script type="text/javascript">
function loadit(urlin, userin, chaturl)
{
currshow.innerHTML='Currently Showing: ' + userin + ' <input type=button value=Close onClick="currshow.innerHTML=\'\';currshow.style.display=\'none\';"><br><a onClick="currshow.innerHTML=\'\';currshow.style.display=\'none\';" target=_blank href="' + chaturl + '"><iframe frameborder=0 scrolling="no" src="' + urlin + '" height="440" width="503"></iframe><br>Click Here To Join The Chat!</a>';
currshow.style.display='block';
scroll(0,0);
}
</script>
<style>
body{text-align:center;}
.main{width:100%;text-align:center;}
.pushdown {width:800px;float:left;margin:auto;}
.colhd {width:200px;float:left;}
.telem {height:250px;}
.spacer {height:20px;}
#currshow {float:none;display:none;width:500px;height:540px;text-align:center;margin:auto;}
</style>
</head>
<body>
<div class="main">
<h2>Chaturbate XML Example</h2>
<?php
$userlist = simplexml_load_file('https://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=XXXXX');
if(empty($userlist))
{
die('Danger Will Robinson...xml load failed...aborting');
}
$fcnt=0;
foreach ($userlist as $user)
{
if($user->gender=='f')
{
$fcnt++;
}
}
$itemcnt=intval($fcnt/6);
if($fcnt/6-$itemcnt>0)
{
$itemcnt++;
}
$colcnt=0;
$itmcnt=0;
foreach ($userlist as $user)
{
if($user->gender=='f')
{
if($itmcnt==0 || $itmcnt==$itemcnt)
{
$colcnt++;
if($itmcnt>0)
{
?>
</div>
<?php
}
if($colcnt==2)
{
?>
<div class="pushdown">
<div name="currshow" id="currshow" ></div>
<?php
}
if($colcnt==6)
{
?>
</div>
<?php
}
?>
<div name=col' . $colcnt . ' id=col' . $colcnt . ' class="colhd">
<?php
$itmcnt=0;
}
$itmcnt++;
$iframe=substr($user->iframe_embed,strpos($user->iframe_embed,'http'));
$iframe=substr($iframe,0,strpos($iframe,"'"));
?>
<div class="telem">
Host: <?php echo substr($user->username,0,20); ?><br>
<img src="<?php echo $user->image_url; ?>" onClick="loadit(<?php echo "'$iframe','$user->username','$user->chat_room_url'"; ?>);"><br>
Time on line: <?php echo number_format($user->seconds_online/60,2); ?> minutes<br>
Language(s) spoken: <?php echo substr(trim($user->spoken_languages),0,18); ?><br>
<?php
if(substr_count(strtolower($user->location),'http')==0 && substr_count(strtolower($user->location),'@')==0)
{
?>
Location: <?php echo substr(trim($user->location),0,18); ?>
<?php
}
?>
</div>
<div class="spacer"></div>
<?php
}
}
?>
</div>
</div>
</body>
</html>
I have to go eat some breakfast. Will be back.