num_rows>0){ $row = $res->fetch_assoc(); $id = $row['id']; $url = $row['url']; $title = $row['title']; $detail = $row['detail']; $timea = $row['time_add']; $timeu = $row['time_update']; $views = $row['views']; $liked = $row['liked']; $duration = $row['duration']; $keywords = isset($row['keywords'])?$row['keywords']:$keywords; $vdoImg = 'https://i.ytimg.com/vi/'.$url.'/mqdefault.jpg'; $vdoUrl = 'https://www.youtube.com/embed/'.$url.'?autoplay=1'; $metaImg = $vdoImg; $videoPage = '

'.$title.'

'.$detail.'
'; $noPipe = explode("|", $title); if($p1 !== slug($noPipe[0])){ $isInvalid = true; } sql("INSERT IGNORE INTO page_views (url, ip) VALUES ('$canonical', '$ip')"); if($mySql->insert_id > 0){ sql("UPDATE videos SET views=views+1 WHERE id = '$id' LIMIT 1"); } }else{ $isInvalid = true; } } $vdoLink = ''; $prevUrl = ''; $nextUrl = ''; $username = ''; function checkShortVideo($url){ global $canonical; global $ip; global $id; global $vdoUrl; global $vdoImg; global $vdoLink; global $title; global $prevUrl; global $nextUrl; global $username; global $timea; global $duration; global $views; global $liked; global $metaImg; global $mySql; $ql = "SELECT id, tid, title, video, icon, username, views, liked, duration, time_add FROM twitter_post WHERE page_url='$url' ORDER BY id DESC LIMIT 1"; $res = sql($ql); $row = $res->fetch_assoc(); if($row){ $vdoUrl = $row['video']; $vdoImg = $row['icon']; $title = $row['title']; $duration = $row['duration']; $views = $row['views']; $liked = $row['liked']; $metaImg = $vdoImg; $timea = str_replace(' ', '-', $row['time_add']).'+5:30'; $username = isset($row['username'])?' @'.$row['username']:''; $id = $row['id']; $tid = $row['tid']; if($tid){ $vdoLink = 'https://x.com/'.$row['username'].'/status/'.$tid; }else{ $titles = explode("https://", $title); $title = $titles[0]; $vdoLink = isset($titles[1])?'https://'.$titles[1]:''; } sql("INSERT IGNORE INTO page_views (url, ip) VALUES ('$canonical', '$ip')"); if($mySql->insert_id > 0){ sql("UPDATE twitter_post SET views=views+1 WHERE id = '$id' LIMIT 1"); } $prevId = $id-1; $nextId = $id+1; $rs = sql("SELECT page_url FROM twitter_post WHERE id='$prevId' OR id='$nextId' LIMIT 2"); while($rw = $rs->fetch_assoc()){ if($prevUrl === ''){ $prevUrl = $rw['page_url']; }else{ $nextUrl = $rw['page_url']; } } return true; }else{ return false; } } function getRecentVideos($start, $pageLimit){ $htmlStr = ''; $res = sql("SELECT * FROM videos WHERE active=1 ORDER BY id DESC LIMIT $start, $pageLimit"); while($row = $res->fetch_assoc()){ $id = $row['id']; $url = $row['url']; $title = $row['title']; $detail = $row['detail']; $auth = $row['author']; $timea = date('d-M-Y', strtotime($row['time_add'])); $noPipe = explode("|", $title); $href = slug($noPipe[0]); $htmlStr .= '

'.$title.'

At - '.$timea.' by - '.$auth.'

'; } return $htmlStr; } if(($p1 == 'shorts' && $p2 && !checkShortVideo($p2)) || $isInvalid || $p3 || $p4){ include_once('../404/index.php'); exit(); } ?> "> <?php echo $title; ?> '; if($videoPage === 'shorts'){ if($p2){ include_once("shorts.php"); }else{ echo '

Favorite Cricket Shorts!

'; echo getTopStories('Deepawali Specials', true, 'festival'); echo getTopStories('Recent Shorts', true, '', '{"hideViewMore":1}'); echo getTopStories('Popular Shorts', true, '', '{"hideViewMore":1}'); echo getTopStories('IPL 2025 Shorts Videos', true, 'ipl', '{"hideViewMore":1}'); } }else if($videoPage){ echo $videoPage; include_once("../common/share.php"); echo '

Recent Published Videos

'.getRecentVideos(0, 6); echo ''; echo getWidget('Cricket', 'Upcoming Matches', true); echo getTopStories(); echo adsBox(); }else{ $pageLimit = 15; $pageIndex = (int)$p2>1 ? (int)$p2 : 1; $start = ($pageIndex-1)*$pageLimit; $htmlStr = '

Watch Free Videos & Shorts for Winning Tips and Entertainment

'; $htmlStr .= getTopStories('SHORTS', true); $htmlStr .= getTopStories('Popular Shorts', true); $htmlStr .= '

RECENT VIDEOS

'; $htmlStr .= getRecentVideos($start, $pageLimit); $htmlStr .= ''; $htmlStr .= paginations($pageIndex, $pageLimit, "videos"); echo $htmlStr; echo adsBox(); } echo ''; if($p1 !== 'shorts' || !$p2) include_once("../common/footer.php"); ?>