Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 12-29-2005, 12:31 PM
-Tigger- is offline -Tigger-
BB

Join Date: Jul 2003
Posts: 5,341

i really need to find a calender script but my google wont work, ! nor will the 3 sites i used to get my site off
Reply With Quote
  #22  
Old 12-29-2005, 12:43 PM
-Tigger- is offline -Tigger-
BB

Join Date: Jul 2003
Posts: 5,341

hey guys, does anyone know what your call the script that shows your details, like IP and ISP, ive got 1 site to work but i dont know what to search for lol
Reply With Quote
  #23  
Old 12-29-2005, 04:00 PM
Capers is offline Capers
Registered User

Join Date: Oct 2003
Posts: 158

PHP Code:
$_SERVER["REMOTE_ADDR"
will return the clients ip address. And for isp, well the hostname would be best to identify that so i would look into gethostbyaddr()
__________________
Reply With Quote
  #24  
Old 12-29-2005, 04:28 PM
-Tigger- is offline -Tigger-
BB

Join Date: Jul 2003
Posts: 5,341

Quote:
Originally posted by Capers
PHP Code:
$_SERVER["REMOTE_ADDR"
will return the clients ip address. And for isp, well the hostname would be best to identify that so i would look into gethostbyaddr()
how do i enter that, just copy and paste it?
Reply With Quote
  #25  
Old 12-29-2005, 04:32 PM
Capers is offline Capers
Registered User

Join Date: Oct 2003
Posts: 158

Well it's just like any other variable.

To output the ip address you can just do:

echo $_SERVER["REMOTE_ADDR"];

Or if you want you can asign it to another variable so that it is easier to work with, like:

$user_ip = $_SERVER["REMOTE_ADDR"];
__________________
Reply With Quote
  #26  
Old 12-30-2005, 11:41 AM
-Tigger- is offline -Tigger-
BB

Join Date: Jul 2003
Posts: 5,341

just found a script (its another php block) i edited it the same way that you done the one for the clock, but it still doesnt go in right. heres the code

PHP Code:
<?php
// who is where v2.1
if (eregi("block-Who-is-Where.php",$PHP_SELF)) { Header("Location: index.php"); }
$content "";
global 
$admin,$user$cookie$prefix$user_prefix$dbi$anonymous,$name,$lang;

//
// language system
//
if ($lang=='french')
{
define("_MEMBRES","Membres");
define("_VISITEURS","Visiteurs");
define("_VISITEUR","Visiteur");
define("_PAR","Par");
}
else if (
$lang=='russian')
{
define("_MEMBRES","×ëåíû");
define("_VISITEURS","Ïîñåòèòåëè");
define("_VISITEUR","Ïîñåòèòåëè");
define("_PAR","By");
}
else if (
$lang=='spanish')
{
define("_MEMBRES","Miembro");
define("_VISITEURS","Visitante");
define("_VISITEUR","Visitantes");
define("_PAR","Por");
}
else if (
$lang=='italian')
{
define("_MEMBRES","Membri");
define("_VISITEURS","Ospiti");
define("_VISITEUR","Ospite");
define("_PAR","Da");
}
else if (
$lang=='portuguese')
{
define("_MEMBRES","Miembro");
define("_VISITEURS","Visitantes");
define("_VISITEUR","Visitante");
define("_PAR","Da");
}
else
{
define("_MEMBRES","Members");
define("_VISITEURS","Visitors");
define("_VISITEUR","Visitor");
define("_PAR","By");
}







$result2 sql_query("SELECT username,guest,module,url FROM $prefix"._whoiswhere." order by username"$dbi);
$member_online_num2 sql_num_rows($result2$dbi);
$who_online_now2 "";
$i 1;

while (
$session sql_fetch_array($result2$dbi)) {
    if (isset(
$session["guest"]) and $session["guest"] == 0) {
        if (
$i 10) {
            
$who_online_now2 .= "0$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&op=userinfo&uname=$session[username]\">$session[username]</a> -&gt; <a href=\"$session[url]\" target=\"_blank\">$session[module]</a><br>\n";
        } else {
            
$who_online_now2 .= "$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&op=userinfo&uname=$session[username]\">$session[username]</a> -&gt; <a href=\"$session[url]\" target=\"_blank\">$session[module]</a><br>\n";
        }
        
$who_online_now2 .= ($i != $member_online_num2 "  " "");
        
$i++;


if (
$member_online_num2 0) {
    
// $content = "Les membres:<br>$who_online_now<br>";
}
    

}
}
$result3 sql_query("SELECT username,guest,module,url FROM $prefix"._whoiswhere." order by username"$dbi);
$member_online_num sql_num_rows($result3$dbi);
$who_online_now "";
$i 1;
;
while (
$session sql_fetch_array($result3$dbi)) {
   if (isset(
$session["guest"]) and $session["guest"] == 1) {
       
        if(isset(
$admin)) 
        {
             if (
$i 10) {
             
$who_online_now .= "0$i:&nbsp;$session[username] -&gt; <a href=\"$session[url]\" target=\"_blank\">$session[module]</a><br>\n";
             } else {
             
$who_online_now .= "$i:&nbsp;$session[username] -&gt; <a href=\"$session[url]\" target=\"_blank\">$session[module]</a><br>\n";
             }
        }
        else
        {
             if (
$i 10) {
             
$who_online_now .= "0$i:&nbsp;"._VISITEUR."$i -&gt; <a href=\"$session[url]\" target=\"_blank\">$session[module]</a><br>\n";
             } else {
             
$who_online_now .= "$i:&nbsp;"._VISITEUR."$i -&gt; <a href=\"$session[url]\" target=\"_blank\">$session[module]</a><br>\n";
             }

        }

        
$who_online_now .= ($i != $member_online_num "  " "");
        
$i++;
   }
}




$content "<img src=\"images/Who-is-Where/members.gif\"> <u><b>"._MEMBRES.":</b></u><br>$who_online_now2<br><img src=\"images/Who-is-Where/visitors.gif\"> <u><b>"._VISITEURS.":</b></u><br>$who_online_now";






// the link will be display only for anonymous user... 
// please let it for my futur work on this fun block

if(isset($user)) {
}
else {

    
$content .= "<center>"._PAR." <a href=\"http://www.surf4all.net\" target=\"_blank\">Surf</a></center>";

}
?>
beginning to thinkt that i might aswell stop looking at PHP codes and keep it simple, just cant get my head round it all
Reply With Quote
  #27  
Old 12-30-2005, 03:33 PM
Capers is offline Capers
Registered User

Join Date: Oct 2003
Posts: 158

Theres no point taking that code to use with your site, it is designed to manipulate/display data for phpnuke.

That code really will only work for phpnuke.

It would be best to have a good grasp of html, or whatever markup code you want to use before you start using server side languages like php.

[edit]
Also if you want any help or you have any questions and you wanna talk to me on msn, that would be no problem. Just PM me for my msn contact.
__________________

Last edited by Capers; 12-30-2005 at 04:42 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Death Clock teej General Chat 19 11-19-2006 05:12 AM
PHP :| Form Checking Problems JonM Web design and Programming 4 01-27-2006 12:08 PM
bf2 installing problems... atreyu Gaming Talk 2 10-08-2005 09:44 AM
death clock .ex. General Chat 5 12-25-2004 04:33 AM
problems installing team sabre killerthekiller Delta Force 5 03-13-2004 07:27 PM


All times are GMT -5. The time now is 10:19 PM.




Powered by vBulletin®