View Single Post
Old 10-14-2016, 11:55 AM  
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 393
I'm not sure I understood what you want to do, but some time ago I did something similar to a paging putting a counter inside the foreach

Code:
<?php
$xml = simplexml_load_file("camsx.xml");
foreach($xml->children() as $child){
    $gal[$child->getname()] = $child[0];
    
    foreach($child as $ch){
        $gal[$ch->getname()] = $ch[0];
    
    }
    if($gal['sex']=="Female" && $n < 1000 && $gal['showmode'] == "free"){
/////////////////////
$start = $_GET['start'];
$stop = $_GET['start']+5;
if($n > $start && $n < $stop){
///////////////////////////////
    ?><div id="grid">	<div class="host_box">
    <a href="/<? echo $gal['screenname']; ?>" target="_self" "><img src="<? echo $gal['liveimage']; ?>" alt="<? echo $gal['screenname']; ?>"><br>
    <? echo $gal['screenname']; ?></a>
    </div>
    <?php
////////////////////
}
////////////////
    $n++;    
}
}
?></div>
$start in my case is passed in GET.
Load anyway the whole xml, but shows only a few lines of output
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote