Jump to content

Jiblix

Members
  • Posts

    14
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Jiblix's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. okay, Heres what I want. I got a Tier 3 Internet connection and a Poweredge Server. I want to run my own webserver but I am unaware of how to set up a DNS. So, I was wondering if anyone could show me how to set up a custom dns for my server. Or.. What I originally had in mind was buying a cheap domain from like startlogic and only placing a index.php file containing a header to my IP address. However the only problem is if I did that then when they typed in.. www.mysitename.com it would immediatly change to http://myipaddress:80 and I dont want this. So my question is, Is there a way to load my server within' another server while keeping the dependant domain name? And I dont want to do an iframe. Either that, Or how would I set up a DNS? Sorry if my question is in the wrong forum.
  2. This might seem like a dumb question, But since your code is enclosed in <?php ?> tags. And its just being echo'd to the browser.. Are you running a PHP and Apache Server? You cant execute a php file by clicking on it. It has to be run from a server. At the top of your browser does it say "http://localhost", "http://127.0.0.1", "http://192.168.1.100", "http://192.168.1.101", "http://192.168.1.102", or "http://192.168.1.103".. etc..
  3. Well, the way I use it is the "style.css" file loads styles that apply to every page. However some pages have content on it that will not be applied to other pages. So it loads its own css from the css directory to work along with the original style.css, This way I dont have 1000 lines of code from a single CSS page loading on a simple page that only uses 1/4 of the functions. Thanks, I was just curious is all.
  4. You need to use Javascript. Not a PHP Header(); tag <HEAD> <SCRIPT LANGUAGE="JavaScript"> function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left = 433,top = 134');"); } </script> </HEAD> <BODY onLoad="javascript:popUp('test.php')"> Hope that helps.
  5. I know whats wrong... ..You have another file on your system called "index.html" and thats being loaded by default. Delete this file and then the "index.php" will load by default instead. Simple fix.
  6. Just a general question here. Im setting up a new webserver application. And I am wondering generally how you guys set up your file system. I am using a Windows 7 64-BIT OS for the server and the home directory is ./ I understand that you can set up your filesystem in many diffrent ways and it has no real effect on the applications speed. However I was just wondering what is 'standard'. I have been building applications in PHP/MySQL for about 4 years. But have always used a system that works best for me. Generally looking like the screenshot below: [attachment deleted by admin]
  7. Any number HIGHER than "2,147,483,647" will cause the int 2,147,483,647 to be inserted. So.. 2147483648, 6184528348, 9683495836, or anything else will cause 2147483647 to be inserted. Change your data type from int(50) to something like long(15)
  8. Just remember to escape the charactors on ANY $_GET['array']; Because people can use these to very easily 'hack' your website if they aren't secured.
  9. lol ya. I was thinking that myself.
  10. 2,147,483,647 is the highest number possible using 32-bit unsigned integer as a variable type. If you need a number higher than 2,147,483,647 then try a 64-Bit Long data type. These support numbers from negative 9,223,372,036,854,775,808 to positive 9,223,372,036,854,775,807, Zero, and Null.
  11. If you dont have access to the server, Im afraid you wont be able to save the script. Let alone operate it. Its been a while since I have used UNIX but I believe you would need 777 privelages to properly run the script without error. Sorry.
  12. Well, for me personally I try to use as little PHP files as possible. Each executing as little code as possible. For example you dont want a file called "Functions.php" That you contain thousands of functions in when the page you are loading only needs one of those functions. Because of that your loading lets say.. an extra 15,000 lines of code that never get executed. Keep your code simple. And dont include things that are not relative to the script that is being run. Hope this helps.
  13. Is this what your looking for? <?php session_start(); define("MAX_IDLE_TIME", 3); function getOnlineUsers(){ if ( $directory_handle = opendir( session_save_path() ) ) { $count = 0; while ( false !== ( $file = readdir( $directory_handle ) ) ) { if($file != '.' && $file != '..'){ if(time()- fileatime(session_save_path() . '\\' . $file) < MAX_IDLE_TIME * 60) { $count++; } } closedir($directory_handle); return $count; } else { return false; } } ? Then to display the numbers online you would use <?php echo 'Number of online users: ' . getOnlineUsers() . '<br />'; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.