Hey everyone, I am a new member here and I was playing around with some ideas this morning and I figured out how you can log the username for anyone who visits your petpage. This may be considered "useless" but you can possibly use this to check who read your "Avatar Lending Requirement" page, or just use it to generate a list of usernames. Anyways, here how to do it: REQUIREMENTS: Access to Web Server that supports PHP (Google for a free one) A Neopets account over 24 hours old. A Neopet STEPS: 1. Create a new FOLDER somewhere on your server called "helloworld.jpg" (Name of the FOLDER. No quotes.). 2. Create an empty Text file called "log.txt", and upload inside of the folder you just made. ("helloworld.jpg"). 3. Make a new PHP FILE named "index.php" (Once again, no quotes.) 4. Inside of the file, put the following code in: Code (Text): <?php $val = $_GET['username']; $data = $val."\n"; $fp = fopen("log.txt", "a"); fwrite($fp, $data); fclose($fp); ?> 5. Upload "index.php" to your folder "helloworld.jpg" 6. Now, on your petpage, put the following line of code in (Change "YOURWEBSITEHERE" to your website!) Code (Text): <img src="http://YOURWEBSITEHERE.com/helloworld.jpg?username=#VISITOR"> 7. Make sure that you have updated your petpage with that code, and now test it by going to your petpage. 8. You will be able to check the log of the usernames at: That is it! I will add a list of free PHP hosts at the end of the page if you guys find any that have worked for you.
I don't see the usefulness here, but I do like the simple coolness it has. Keep up this behaviour and you'll be one very welcome person on this forum.
Haha, nice code snippet With certain web hosts, they will allow you to have file extensions other than *.php to execute PHP scripts. Thus you could put the script in a text file called "helloworld.jpg" and it work work similarly. Just a slightly simpler thought for people who may have access to such a host. And welcome to Neofriends
You can use freehostia, it's really simple to register an account and put a site on it. However, you can also use the Apache mod_rewrite Module, it would be alot cleaner to do. You can use the rewriterule Code (Text): RewriteRule /image\.jpg /script.php This would rewrite the url "http://www.yoursite.com/image.jpg" to "http://www.yoursite.com/script.php" with no redirection.
Welcome to NeoFriends! Just a pointer: In PHP, using '' instead of "" is faster... Can't find proof right now, will later Also, Is there a reason that quick reply doesn't work with Google Chrome?
Do they still even work on neopets? Regarding this: I think TNT would have a filter running to monitor if a petpage is sending out packets when a user visits. Though I can't base this on anything more then common sense.
No, this is not a tutorial for CGers. CGers require access to document.cookie, which I'm pretty sure is blocked on Neopets (directly anyways) TNT can't monitor the "packets" of data since the "image" is directly loaded from the hosting server to the browser. They can only monitor the code that you put on the petpage.
I don't me dig this post up so please don't flame me for doing so just trying to help: If you want a pre-made one with absolutely no work go to NeoMallers (the website) and you can make these for petpages by simply typing in your pets name