Jump to content
xisto Community

ChronicLoser

Members
  • Content Count

    245
  • Joined

  • Last visited

Everything posted by ChronicLoser

  1. lol, now there's a function of php I didn't know! lol, i guess you learn something new everyday =P thanks, both of you, for the info. I'm sure it'll go to good use [edit] oops, sorry bout that...i edited my post
  2. lol, i'm pretty sure it isn't necessary to go through all that coding just to go up and down...here's left to right:<marquee direction="left" width="x" height="y">Text You Want To Scroll</marquee>here's right to left:<marquee direction="left" width="x" height="y">Text You Want To Scroll</marquee>here's up to down:<marquee direction="down" width="x" height="y">Text You Want To Scroll</marquee>and here's down to up:<marquee direction="up" width="x" height="y">Text You Want To Scroll</marquee>it's as easy as that =P No extra coding is really necessary unless you want to get all fancy
  3. lol, well, i'd say php, html, and maybe a little jsp. At least, this is what I use on my sites. Of course, as it was mentioned earlier...there is no "best language" because it depends on the site and the overall goal the webmaster has for his/her site. And most of the time a webdesigner impliments more then one type of web coding into their site
  4. if you're refering to my post...then my answer is I don't know it depends on whether or not blogger.com allows php codes. If it does, you're going to have to do the script slightly differently because you will be hosting the "unique.dat" and "unique.php" on a different site, I'm presuming... but if blogger.com does work, simply use: <?php include("http://url-of-your-site/unique.php"); ?>instead
  5. Alright, here is a UNIQUE counter I made that requires php. A unique counter only counts how many DIFFERENT users go to your site. In other words, if you have fifty users who clicked on you site two hundred times, it will only show 50. Alright, first things first. Assuming you have windows, right click on your desktop, and make a new text document. Rename the document to "unique.dat". Alright, make another new text document. Now open up your new text document and paste this into it: <?php$filename = "unique.dat";$file = file($filename);$file = array_unique($file);$hits = count($file);$remote = $_SERVER["REMOTE_ADDR"];$wholefile = file_get_contents($filename); if (preg_match("/$remote/i",$wholefile)) { echo $hits; } else { $fd = fopen ($filename , "a+"); $fout = fwrite ($fd , "$remote\n"); fclose($fd); echo $hits; }?>Done? Alright, now go back to the desktop, and rename this text document "unique.php". Now upload the two files into your hosting account (whether, it's through cpanel or an ftp application). Set your "unique.dat" to CHMOD 777. You're done. Now, wherever you want the number to be displayed on your site, place this in the html of your php file: <?php include("unique.php"); ?>It will only display the number so if you want you can also do something like this to display "unique hits = #" unique hits = <?php include("unique.php"); ?> And that's that. I tried to go through step by step, but if you need additional help feel free to ask
  6. sure, eclipse may be able to do a lot with many different type of codes...but i couldn't help noticing how slow it can be at times when you try to run your program. And maybe it is simply the mac copy my school uses, but I find it annoying that i have to restart the entire application if i accidently put the program into an infinite loop. If there is a way to stop a program from running from a loop, please share
  7. heh, i was actually looking for a shorter and more "straight-forward" answer. But thanks for the microtime part, but it will be kinda unneeded. I have other plans for the title =P $filename = $title . '.txt';$fh = fopen ( $filename, 'w' ) or die ( "Cannot open $filename for writing. " );So, you're saying if I had something like this, it will create a new file in the same directory? Alright, I looked over what you gave me and this isn't exactly what I want. Say I have an empty folder with nothing but index.php. In the index.php, it will create a brand new text file. All I want to know is that one line that will create that $title.txt or $title.dat or $title.php. Perhaps I am using your code wrong, but it seems to be that what you gave me simply opens an already made file and write into it. But thanks anyways, microscopic^earthling! It looks like you put a lot of time going through all that stuff for me...now I kinda feel bad =P - EDIT - Shoot, nevermind. By setting it to 'w' it's supposed to write a new file on its own when the server can't find it. I've got the problem fixed. Thanks microscopic^earthling!
  8. ...okay, say my file is hidden. Then how do i access it again? And when you say "hidden", is it the same thing as when you right-click>Properties then check the hidden box? Or is this a different type of file hiding? loloops, nevermind. I just tried it, and I have no idea where hidden.doc ran off to, lol. Alright, so how do i access the hidden file?
  9. i also use tables for my site...and i've regretted it >_< divs seem much more efficient and easier to change. Tables (if you use them for designing) are hard to change when I want to change something in the design/layout. THe reason I used tables was because, like nykademis i found that imageready does a better job with tables then divs, though I know it is possible to change the settings to use divs instead
  10. Alright, i just need to know how I would create a new text file with php. When the php program is activated for whatever reason, it will create a new text file of a different name in the same folder. Not sure if i'm making this clear enough...I want a code in php that will create a new seperate text file in the same folder the original code is hosted in. And don't give me something that requires a database...i'm pretty sure there is a simple function that will allow me to do this. I just don't know what it is... =/
  11. lol, that was interesting. Must of taken a lot of work to get it to look just right. I've tried making one of those before but after a few attempts and some pretty exhausting work, i gave up and never tried again =P
  12. eh...i never tried w3c, but then again i didn't learn my coding off tutorials =P if you want single codes, there's always http://www.pixel2life.com/ though they give you single code tutorials, if you do enough of them, you can start getting an idea of how html/css/php works
  13. lol, i don't think it'd be absolutely necessary to change the splash swf. I'm usually surfing the web as i wait for the application to load and don't even bother looking at the default swf they gave us =P
  14. well i haven't the time to make original tutorials on my own, but i suggest http://www.pixel2life.com/ for tutorials on almost every popular graphic applications
  15. hmm, interesting. I never knew google had the ability to do something like that lol. It's amazing how much I don't know about all these things that are going around/having to do with google =P
  16. alright, i found the problem. It was cause I had a seperate file with bad coding that could also access the 'unique.dat' file. So my little php script officially works now (and to marijnnn - I couldn't get the code you suggested to work properly because it seems to always result in false, no matter what was within the unique.dat file) anyways, here's the final code if anyone wants to use it. You will also need a unique.dat file in the same folder and have it CHMOD to 777 <?php$filename = "unique.dat";$file = file($filename);$file = array_unique($file);$hits = count($file);$remote = $_SERVER["REMOTE_ADDR"];$wholefile = file_get_contents($filename); if (preg_match("/$remote/i",$wholefile)) { echo $hits; } else { $fd = fopen ($filename , "a+"); $fout = fwrite ($fd , "$remote\n"); fclose($fd); echo $hits; }?>
  17. how do you know that the unique visitors were all from the accounts you set up withou depositing money into? Perhaps for some completely random reason, people started flooding to your site. Or maybe one of those normally 5 unique visitors has one of those programs that constantly change their ips so you think you have 170 unique visitors =Pjust something to consider
  18. Alright coder....i read your reply, and fixed up some things. The $_SERVER['PHP_SELF'] was completely unneccessary so i took it out. I was trying to something else earlier. The $var was also a careless mistake on my part so I took that out. I also changed around the if/then statement, but I wasn't sure what you meant when you said I was to loop through the arrays. I'm trying to match the ips using the preg_match function, so I don't think the loop would be needed...but correct me if I'm wrong cause I'm not the exactly the brightest person you could find anyways, here's the edited code: <?php$filename = "unique.dat";$file = file($filename);$file = array_unique($file);$hits = count($file);$remote = $_SERVER["REMOTE_ADDR"];$wholefile = file_get_contents($filename); if (preg_match ("/$remote/i", $wholefile)) { echo $hits; } else { $fd = fopen ($filename , "a+"); $fout = fwrite ($fd , "$remote\n"); fclose($fd); echo $hits; }?>
  19. alright here's what I want to do: I made a counter to count unique visitors without a mysql. But the problem is that the '.dat' file I'm writing on (unique.dat) tends to become too big when I have too many visitors. Thus, I tried to add an if/then statement. Kay, now here's the problem: even though this code successfully runs, it's not a hundred-percent accurate. Sometimes it rewrites a user's IP even though it is already on the '.dat' file. Even though it doesn't actually affect the $hits, I'd still like to know what I did wrong. <?php$filename = "unique.dat";$file = file($filename);$file = array_unique($file);$hits = count($file);$remote = $_SERVER["REMOTE_ADDR"];$var = $_SERVER['PHP_SELF'];$var = 'unique.dat';$wholefile = file_get_contents($var);preg_match_all("|$remote|U",$wholefile, $out, PREG_PATTERN_ORDER);if(!($out[0][0] == $remote)){$fd = fopen ($filename , "a+");$fout = fwrite ($fd , "$remote\n");fclose($fd);echo "bad";}echo $hits; ?>hope someone could help me out here
  20. hello hello! Welcome to the Xisto forums! Hope you enjoy posting here...
  21. running off windows xp? Alright then it's easy. Go here: (http://php.net/downloads.php). Now scroll down to where it says "PHP 5.0.3 installer." Click the link, and follow whatever steps it may have, and it will be installed for you. hope this is what you're looking for
  22. ...you mean you cannot see the affiliate buttons when you set their sizes to 88x31? Truthfully, I looked at your site through firefox and through IE...and I see the affiliate buttons on every single webpage. So I'm not too sure why you cannot see the 88x31 buttons...
  23. ...what is the point of this post? lol, what's the question?
  24. lol, wow! thanks! I've actually been wondering that myself lol, but i've never really took the time to ask like infozone (and welcome to the board info)
  25. lol, looks nice, but i'm a bit short of space on my computer right now, so i'll have to hold off till later to try it out. Until then, Cinema 4D is working perfectly for me
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.