PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Sat Jun 06, 2009 8:51 pm Reply with quote Back to top

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
//Latest Referrer Block for RavenNuke by Dawg with Help from the RN Staff
//Palbin
//Guardian2003
//Thank You for Your Time
//~~~~~~~~~~~~~RavenNuke ROCKS! ~~~~~~~~~~~~~~~~
/************************************************************************/


if ( !defined('BLOCK_FILE') ) {
   Header('Location: ../index.php');
   die();
}
global $prefix, $db;

$domain= ($_SERVER['HTTP_HOST']);
//Set $Showtime
//Set to 1 for for both Date/time
//Set to 2 for Date
// Set to 3 for  Off
$showtime= '1';
//How Many Referers to show?
$number= 30;
//No Edits needed below this line
$querystr = "SELECT refered_from,date FROM ".$prefix."_nsnst_tracked_ips  WHERE refered_from NOT LIKE 'local' AND refered_from NOT LIKE 'on site' AND refered_from NOT LIKE 'none' AND refered_from NOT LIKE '%$domain%' ORDER BY date DESC LIMIT $number" ;
   
   $result = $db->sql_query($querystr) 
   or die ('invalid query in towndisplay');
   $numrows = $db->sql_numrows($result);
   for ($n=0; $n < $numrows; $n++)
   {
      list ($refered_from,$date) = $db->sql_fetchrow($result);
         if($refered_from !='on site' AND $refered_from !='none' AND $refered_from !='local') {

//Set the number below to the desired width
            if(strlen($refered_from) > 30) {
               $rfrom = substr($refered_from, 0, 30).'...';
//End Edit desired width number
            } else {
               $rfrom = $refered_from;
               }
            $content .= '<a href="' . $refered_from . '" title="' . $refered_from . '" target="_blank">' . $rfrom . '</a>';

            if ($showtime==1){
               $timestamp = strftime('%D - %r',$date);
               $content .= ' - ' . $timestamp;
            }
            elseif($showtime==2){
               $timestamp = strftime('%D',$date);
               $content .= ' - ' . $timestamp;
            }
            elseif($showtime==3){
               $content .= '';
            }
            $content .= '<br />';
         };
   };
?>


If you have any questions or concerns, Please post them here...
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
southern
Client


Joined: Jan 29, 2004
Posts: 579
Location: Texas

PostPosted: Wed Jul 28, 2010 5:44 pm Reply with quote Back to top

That's a useful block, Dawg.
How could I combine it with an IP display?
Code:

<?php
$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,255,255,255);
$textcolor = imagecolorallocate($img_number,0,0,0);
imagefill($img_number,0,0,$backcolor);
$number = "$_SERVER[REMOTE_ADDR]";
Imagestring($img_number,10,5,5,$number,$textcolor);
header("Content-type: image/jpeg");
imagejpeg($img_number);
?>

The above is saved as image.php and called w/an img tag... is it possible to include various HTTP codes in it? Can it be used as a block? Thanks
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum