snlildude87
Mar 25 2005, 03:26 AM
As some of you may know, I asked a question on how to get a portion of the URL in the address bar and save it, and thanks to several sources*, I have successfully learned how to do that. Today, I will share with you, step-by-step, my knowledge. The object of this tutorial is to mimic a feature on many subprofiles where you're able to see the AIM screennames of people who viewed your site. Note: The URL that I will be using extensively throughout this tutorial is http://yoursite.trap17.com. This is not a special URL reserved on trap17 but is merely a representation of your site, so you'd need to replace that URL with your own. In my case, it'd be http://sang.trap17.com. More noteage: Since the forum does not allow more than one space (" ") and my tutorial is intended to be in outline format, the numbering is a little weird, but the overall meaning of the tutorial is the same. 1. Open Notepad 2. Copy and paste the following code into Notepad: CODE <?php $name = $_GET["name"]; //gets whatever is after "name=" in your URL (for example, the URL http://yoursite.trap17.com/index.php?name=myname will store "myname" in the variable $name $file = "info.txt"; //this is the file name, or the list, of the screennames of people who viewed your site $handle = fopen($file, "a"); //opens info.txt to append fwrite($handle, $name); //appends whatever is in the variable $name to info.txt fwrite($handle, ";\n"); //adds a new line to info.txt after appending fclose($handle); //closes file connection ?>
3. Save the Notepad file as index.php (Use the same configuration I have in the screenshot to successfully save the file as a .php file)  4. Make a new file in Notepad (File -> New) 5. Save the blank file as info.txt in the SAME DIRECTORY as index.php saved in step 3 6. Upload a. WS_FTP [Professional] (I will assume you already know how to use this program) 1. Upload info.txt and index.php to a folder in your trap17 account (I am going to use the root folder* in this tutorial) 2. Right click on info.txt on your trap17 webspace (the right side of WS_FTP) 3. Select Properties in the menu 4. Enter 777 as the numeric value  b. Browser 1. Go to your cPanel (http://yoursite.trap17.com/cpanel) 2. Click on File Manager in Site Management Tools 3. Click on the FOLDER ICON next to "www" 4. Click on Upload file(s) 5. Click the first "Browse..." button 6. Find info.txt 7. Click Open 8. Click on the second "Browse..." button 9. Find index.php (it should be in the same directory as info.txt) 10. Find and click on info.txt on the left side of the window. 11. You should see the following menu on the right side of the browser: QUOTE Show File Delete File Edit File Change Permissions Rename File Copy File Move File
12. Click on Change Permissions 13. Enter 7 for the User, 7 for the Group, and 7 for the World  14. Click Save 7. To test, you have to put a link to index.php in your AIM profile: a. Go to your buddy list b. Go to My AIM -> Edit Profile... d. If you get a window with an OK button on it, click OK e. Click the Next button (it should be at the bottom next to the Cancel button) twice f. Click on link g. Enter in the following "http://yoursite.trap17.com/index.php?name=%n" (without quotes) for "Hyperlink URL". Remember to replace yoursite.trap17.com with the URL of your site h. For Hyperlink Text, enter "Check out my site!" (without quotes - by the way, any text can go here) i. Click OK in the "Edit Hyperlink" box, and Finish in the "Create a Profile" box You're done! You can either get a friend to click on the link in your profile, or test it out yourself. To test it yourself, go to your URL (http://yoursite.trap17.com/index.php?name=testing). If you followed my instructions explicitly, then you should not get an error or warning, but you should see a blank page. Now, go you http://yoursite.trap17.com/info.txt, and you should see "testing;" on the first line. Be sure to check info.txt periodically to see who viewed your site  ! *I like to thank beeseven for helping me get started as well as SAMS Teach Yourself PHP4 in 24 HoursEdit: One of the BBCode did not show up, but it does now 
Comment/Reply (w/o sign-up)
elevenmil
Mar 25 2005, 05:32 AM
A quick Q for you, and I don't think you mentioned it...does this feature tell HOW MANY TIMES someone has clicked your link? I already do a IMCHAOS link in my buddy profile but if your feature counts how many times someone clicks your link I'll have to try it out...
Comment/Reply (w/o sign-up)
rectab
Mar 25 2005, 04:26 PM
Copied post from above deleted.
Comment/Reply (w/o sign-up)
snlildude87
Mar 25 2005, 06:00 PM
QUOTE(elevenmil @ Mar 25 2005, 02:32 AM) A quick Q for you, and I don't think you mentioned it...does this feature tell HOW MANY TIMES someone has clicked your link? I already do a IMCHAOS link in my buddy profile but if your feature counts how many times someone clicks your link I'll have to try it out... Yes and no. It does not tell you the number of people who visited your site via AIM, but it does list the people who visits your site through AIM, so the only way to know is to count the lines in info.txt
Comment/Reply (w/o sign-up)
rejected
Jun 7 2005, 05:54 AM
I was wondering how IMCHAOS did it... Thanks for this, I'm going to put it in my profile now  Something to add: If you want to add the date that the person viewed your profile, try this: CODE <?php $name = $_GET["name"]; //gets whatever is after "name=" in your URL (for example, the URL http://yoursite.trap17.com/index.php?name=myname will store "myname" in the variable $name $date = $_GET["date"]; //gets whatever is after "date=" in your url $file = "info.txt"; //this is the file name, or the list, of the screennames of people who viewed your site $handle = fopen($file, "a"); //opens info.txt to append
fwrite($handle, "$name | $date\r\n"); fwrite($handle, ";\n"); //adds a new line to info.txt after appending fclose($handle); //closes file connection ?>
and in your profile put in the link as "http://yoursite.trap17.com/index.php?name=%n&date=%d" thanks again snlildude! edit: forgot a semicolon in the code XD
Comment/Reply (w/o sign-up)
snlildude87
Jun 9 2005, 07:52 PM
QUOTE(rejected @ Jun 7 2005, 02:54 AM) I was wondering how IMCHAOS did it... Thanks for this, I'm going to put it in my profile now  Something to add: If you want to add the date that the person viewed your profile, try this: CODE <?php $name = $_GET["name"]; //gets whatever is after "name=" in your URL (for example, the URL http://yoursite.trap17.com/index.php?name=myname will store "myname" in the variable $name $date = $_GET["date"]; //gets whatever is after "date=" in your url $file = "info.txt"; //this is the file name, or the list, of the screennames of people who viewed your site $handle = fopen($file, "a"); //opens info.txt to append
fwrite($handle, "$name | $date\r\n"); fwrite($handle, ";\n"); //adds a new line to info.txt after appending fclose($handle); //closes file connection ?>
and in your profile put in the link as "http://yoursite.trap17.com/index.php?name=%n&date=%d" thanks again snlildude! edit: forgot a semicolon in the code XD Hey man, no problem.  My code is a bit inefficient if you have lots of users clicking on the link in your profile because it writes stuff to info.txt even if $name is blank (if someone types in http://thyelite.com instead of http://thyelite.com?name=rejected), but you can add an if...then statement so that it only writes if $name is NOT blank.
Comment/Reply (w/o sign-up)
compwiz3000
Aug 11 2005, 08:29 PM
I've created an AIM Profile Tracker which records who views your profile, how many times the have viewed your AIM profile, and when they last viewed your AIM profile. To register for it, simply go to http://www.venkatkoduru.gamerzparadise.biz...Track/index.php, click register, enter your screen name, and copy the code given into your AIM Profile.
Comment/Reply (w/o sign-up)
beeseven
Aug 12 2005, 02:40 PM
If you want to have the link open in the profile window (like some subprofile sites do), type the following code somewhere then copy and paste into AIM: CODE <a href="http://yoursite.trap17.com/profile.php?name=%n" target="_self">Click here</a> If you copy and paste from an AIM window to another AIM window it won't work. Also make sure the URL works.
Comment/Reply (w/o sign-up)
David789
Aug 21 2005, 02:04 PM
Why is it just AIM? Why not MSN?
Comment/Reply (w/o sign-up)
snlildude87
Aug 21 2005, 03:56 PM
QUOTE(David789 @ Aug 21 2005, 11:04 AM) Why is it just AIM? Why not MSN? Because AIM rocks. You can't do this in MSN. Besides, all my friends use AIM, and I don't know anyone in real life who uses MSN.
Comment/Reply (w/o sign-up)
snlildude87
Aug 21 2005, 04:26 PM
QUOTE(mahesh2k @ Aug 21 2005, 01:20 PM) Php can anyone suggest better book than sam. Well, you can start learning PHP at http://w3schools.com/. That will show you the basics, and if you know a new function, and you want to look it up, you can go to http://php.net/ to find its arguments and syntax.
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : Who39s Viewing Site Targeted Aim Users- Php Quiz Script
- Make quizzes for your site. (29)
Hello all, A little bit back I decided to make a quiz scriptjust out of no where lol. However it
doesnt do anything special but I am going to make an email mod for it so that it will email results
to your email address. So here is the basis of it. INSTRUCTIONS: Open a new page in your text
editor and paste in the following code. CODE $qid = "Quiz ID-00"; ?>
Username: 1.) Question number one is? Answer1 Answer2 2.) Question number two is?
Answer1 Answer2 3.) Question number three is? Answer1 Answer2 4.) Question num...
Opening Nat On Your Xbox - Upnp With Netgear
- for NETGEAR users with UPnP enabled (1)
I think all of the NETGEAR Routers now come with UPnP Follow this tutorial and i will show you how
to open your NAT. 1. Go to 192.168.1.1 (or 192.168.0.1 - or whatever they supplied you with) 2. Go
down to maintenance and 'Attached Devices'. 3. My xbox is named '---' - most xboxes
have that default name. 4. Make sure your xbox is located there and is in the IP you selected in
your xbox wifi setup. 5. Now go down to 'Advanced' then 'UPnP' 6. If the
'Turn UPnP On' is toggled - then uncheck it and apply. Then when it update...
How To Put A Phpbb Login Box On Your Main Site.
- Code and .php included!!! (19)
I have included my coded file with this... Ok here is the code. CODE // //Create login area,
replace the phpBB2 in /phpBB2/login.php with your forum's //directory // Prank Place
Forum Index Please enter your username and password to log in.
Username: Password:
Log me on automatically each visit:
I forgot my password You can test this out on my...
Asking Users To Confirm If They Wish To Leave The Page
- (10)
I am sure all of us have had the frustration of having to retype an entire email from scratch
because we accidentally hit "back" or otherwise left the page. As web technology improves and
becomes more profound, such problems have found their simple solutions, as displayed by Google on
Gmail, Google Calendars, Google Pages, Blogger etc. This tutorial will explore this script used to
prevent a user from leaving the page accidentally. In order to achieve this, make sure your users
have Javascript enabled. We will be using window.onbeforeunload. Firstly, open up your HTML ...
How To Make A Very Simple Wap Site
- A quick tutorial about WML language (43)
WAP Site Tutorial : How to Make A Wap site? Before We begin.. Defination from the
Web about Wap. QUOTE WAP is an open international standard for applications that use
wireless communication . Its principal application is to enable access to the Internet from a
mobile phone or PDA .A WAP browser provides all of the basic services of a computer based web
browser but simplified to operate within the restrictions of a mobile phone. WAP is now the
protocol used for the majority of the world's mobile internet sites, known as WAP sites ...
Deny Or Grant Users Access To Files Of Choice (vista)
- Uses Bat Files To Deny Or Grant People Access To Files (3)
[aef] Most Recent Topics Listing Mod
- on your Web-site pages (2)
Assuming that you have an AEF Forum software installed on your Hosting Account, and that you need
to display a list of the most Recent Topics to be display, say, on your Index page, then read this
Tutorial. To begin, Define the variables that you need to connect to the Database and also define
the URL to the Forum in the prescribed format as follows: CODE //define db information here
DEFINE ('DB_USER', ' '); // required info DEFINE ('DB_PASSWORD',
' '); // required info DEFINE ('DB_HOST', 'localhost'); // required...
Php Word Filter
- Have you accidently sworn on your site? Or do you want to keep visitor (9)
This is pretty simple but very useful if you don't want people to swear. We will be using
str_replace for this. CODE str_replace ("curseword, "replacemet"); ?> Thats pretty simple,
just fill in the curse word and the replacement, and then repeat... heres what it would look like
full size: CODE str_replace("swear", "replacement"); str_replace("swear", "replacement");
str_replace("swear", "replacement"); str_replace("swear", "replacement"); ?> Ok, but how do you
get it to work on your page now? Well, save that file as wordfilter.php and use CODE ...
How To Control Other Users’ Privileges (microsoft Windows Steadystate 2.5)
- (1)
Recently Microsoft has developed a program that makes user control easier. The program is called
Windows SteadyState 2.5 and it needs a genuine version of windows. System Requirements
• Supported Operating Systems: Windows Vista Enterprise; Windows Vista Home Premium; Windows
Vista Ultimate Windows XP Professional, Windows XP Home Edition, Windows XP Tablet PC Edition with
Windows XP Service Pack 2 (SP2) installed or Service Pack 3 (SP3) installed, Windows Vista Business,
Windows Vista Home Basic, Windows Vista Starter, or Windows Vista with Servi...
How To Make An Ultimate Game List.
- If you're making a site on video games or such. (0)
Hello. I am BuBBaG. You can call me Bubba for short. I'm going to show you how to make an
Ultimate Game List. First off, we need to make a database, we are going to call this database
`my_db`, leave out the `'s. Inside that database we will need to create a table called
`ugl'(Ultimate Game List, duh). To make the table, simply enter this in the Syntax. CODE
CREATE TABLE ugl ( System char(50), Game char(50), ) In the above code, it is stating we are
creating a table called ugl, with two columns, System, and Game. Next, we will need to make a form,
t...
Create A Google Seach Result Page Embed Within Your Site Page.
- (12)
Create a google seach result page embed within your site page. It is easier to create
web page that embeded the google search result in it. The first step is to go to google apply an
account for the google ad-sense. After that login to you account and choose the create ad-seach
option. Most of time the google search box give all we have the great and powerfull seach ability.
But, have you think every time users get seach with it. They do redirected to another page that is
not within you site. It is easier to create web page that embeded the google sea...
How To: Make A Simple Php Site
- Making one file show up on all pages using php (21)
I have looked all over the site and could not find anything that was like this simple, or just like
this at all.. For some people i know that you are using a basic HTML site...and having a big menu
if you want to add somthing you have to go into every one of the pages and add or remove or edit
what you want to do, but with somthing verry simple all you would have to do is edit one file, and
all of the pages that have the PHP script on them would suddenly change to what that one file is.
So to start off if you are planning on using this little tirck, the page that you a...
Css And Javascript Combined For Dynamic Layout
- use of different CSS files at same site (9)
This tutorial is meant for people that are dealing with problems while coding their site at 100% of
width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
file (take this in account when creating your website). How this script works. In the HEAD of your
HTML document will apply this command, so variable.js file will be load at start: CODE
In browser JavaScript file variable.js is loaded. This Javascript file consist of this parameters,
copy this code and name it variable.js CODE // JavaScript Document if (sc...
Simple Stylesheet Tutorial
- Stylesheet embedded in your site. (2)
Hi - ill show you how to make a simple style sheet that will be embedded into your site. OK make
sure your site is set up already (like the standard tags) To start and end off a stylesheet you
need to do the following CODE Ok lets start CODE p { font-family: "Tahoma";
font-size: 9; color: "red"; } So when you come to put in CODE Hi! The text will
appear red and will be in Tahoma. I will now just show you how to change the background colour of
the text. CODE span.hilightred {background-color: "red";} span.hilightblue {backgrou...
Phpbb Forum Site Transfer
- How to do it, step by step instructions (20)
I'm sure many of you out there have used phpBB at some point. To those who enjoy running forums
and online communities, specifically supporting phpBB, I am about to tell everyone how to restore
the forums database from one website, to another. This is presuming you do not have any mods or
hacks installed. Some of you may find this information useful. Here is the scenario: Let's say
you have forums running phpBB version 2.0.17 (currently the latest one). You have decided that you
want to move your forums to a whole new URL and provider, and as an added bonus, ch...
Php Emailer/contact System
- An email or contact system for your site (20)
Hello all, Here is an easy Emailer or Contact system that allows visitors or members of your site
to email you just by filling out a form. So here is what you need to do to set it up. First open up
a new page in your text editor and paste in the following code. CODE $Name = $_POST ; $Subject
= $_POST ; $Email = $_POST ; $Site = $_POST ; $Message=$_POST ; $align = $_POST ; $to = "$EmailTo";
$subject = "$Subject"; $body = "$Message\n\n\n$Site\nBy: $Name"; $headers = "From: $Email\n";
mail($to,$subject,$body,$headers); // After they've clicked "Send", this is whe...
Checking The Web Site Speed
- (10)
Did you taking too much time to access your favorite sites? Probably the problem is on the server
used by those sites. To make sure that is the problem, use Windows PING facility. Ping is a small
program, which sends a 32-bit signal to the Web site server. Next, Ping record the time needed by
the server to answer it. To activate Ping: Click on the Start-Run menus, type command, and then
click OK. Type PING "site name" in the MS-DOS prompt window, for example PING www.yahoo.com. In a
moment, the result will appear on the screen. A result less than 300ms is normal spee...
How To Set Up A Bookmarking System On Wii
- Use your favorite social bookmarking site. (0)
This is a simple tutorial on a way to set up a bookmarking system on your Wii with greater stroage
than the Favorites. It is more complicated than the Favorites and requires manual URL typing. Well
let's dive on in. Items Required Nintendo Wii Internet Channel 3 Empty Favorites Internet
Connection An account on a social bookmarking site I will be using delicious as an example.
delicious Ok, if you do not have an account, read on. If you do have an account, go to the
{account} section. Ok, first you need to register an account. This can be done by clicki...
Encode Your Email Address
- Confuse the Spam Bots, but not your viewing clients (5)
Spam bots often 'scrape' pages to glean information and collect email addresses. I don't
like that. To combat the Bots from collecting my address off of my site, I wrote a script that
includes 'obscures' the address in several ways. It adds 'AT' where the '@'
sign is and then replaces the '.' with 'DOT' so it is humanly readable, but not by
the Bots. Also, it encodes the 'mailto' and the address used in the 'mailto' so it
shows okay on the web page and on:hover, but it is actually encode into hex value...
Faux Ajax Loading - Css Only
- Pretend your site is Ajax based (3)
Link: http://www.jlhaslip.trap17.com/samples/misc/ajax/index.html Check that out. The first page
has information and the second and has the actual example of its use with sample CSS code. I find
that when you visit a site which has a slow server and attempt to view 'large' Image files,
it is pretty boring to sit and stare at a blank screen, so this little snippet of code can be used
to give the visitor something to see to indicate that the image is being downloaded. I built a
small animated gif that sits in the background of the space allocated for the image...
Dynamic Signature - Yet Another Way To Do It
- Create dynamic sigs for multiple users using .htaccess and RewriteRule (0)
Ever since I connected a program I made in Visual Basic to MySQL database, I had an idea to create
some sort of a status page... And I did that, where I updated my connection status every 60 seconds,
updated my Winamp playlist, and several other interesting things... Then, I figured I could create
an image, and display all that info, and show it on forums, as a signature... And I made a great
PHP script, that look real fancy, and does the job perfectly... So, I was adding the reference to
http://status.galahad.trap17.com/stat.php to all the forums... BUT (there's ...
Making The Popular Id Browsing For Your Site.
- (17)
Was just sitting and being bored but then I realized I could show how to create more or less popular
?id=page browsing. It's actually really easy. I know two ways how to do it. First one I learned
was checking the variable and if it's true including the text/file/anything needed and so on. It
was ok, but sometimes I just couldn't make it work so I switched to switch() function and
that's what I'm going to show you guys right now. So, I made a test page which contains the
code needed and here is its source. CODE Untitled Home - P...
Templating System Using Php Includes
- Building a Dynamic site using Includes and flat-files. (13)
Php based Templating System http://jlhaslip.trap17.com/template/index.php The Source Code
for the scripts are included (literally) on the different pages on the Demo, including the Contact /
Email script. The only page not there yet is the Message Script. Maybe tonight I will upload that.
This one uses a little bit of query-string checking to confirm that the contents of the page are
actually available (file_exists())and an allowed page content before serving it up. The
'allowed page content' is done by checking against a flat-file containing an array...
HTML tags and examples
- Condensed form of course from my site... (37)
Well, I decided to try and help out some of the users here who might be unexperienced in HTML, so I
condensed the begginer's HTML course at my website. Here it is... Lesson 1 HTML means Hyper
Text Markup Language. HTML is a very common language used for many websites, is the base for more
complicated and powerful langauges like php, HTML can seem hard, but you will find it is one of the
easiest langauges one can learn. The core of HTML is the tag, a tage is just a set of two
arrows-like brackets created by hitting Shift and the comma key, or Shift and the period...
How To: Have Opera Check C-panel Webmail
- Geared toward Trap17 users (1)
This tutorial is valid for Opera 9 or above; but previous versions might work. In the menu bar,
go to Tools > Mail and chat accounts... Click on Add... Make sure Regular e-mail
(POP) is selected. (It should be by default.) Click Next > . In this section, you see three
fields: Real Name , E-mail address , and Organization . Organization is
optional. Type in your name in the Real Name field, and your account's e-mail in the
E-mail address field (syntax: cpanel_username@your_subdomain.trap17.com). Click Next...
Cpanel Useful Site Management Tools 2.1
- Part 3 of My 7 Part Tutorial (0)
This Tutorial will be divided into 7 different parts, and this is the first part, when i get the
other parts together, i will post the links under here /biggrin.gif" style="vertical-align:middle"
emoid=":D" border="0" alt="biggrin.gif" /> Enjoy. Part 1: E-mail Management Part 2: Useful Site
Management Tools Part 4: Analysis/Log Files Part 5: Advanced Tools Part 6: PreInstalled
Scripts, Extras, and Cpanel Options Part 7: Fantastico Detailed Cpanel Tutorial Part 2.1:
Useful Site Management Tools In this tutorial I will, in detail explain all of th...
Cpanel Useful Site Management Tools
- Part 2 of My 7 Part Tutorial (0)
This Tutorial will be divided into 7 different parts, and this is the first part, when i get the
other parts together, i will post the links under here /biggrin.gif" style="vertical-align:middle"
emoid=":D" border="0" alt="biggrin.gif" /> Enjoy. Part 1: E-mail Management Part 3: Useful Site
Management Tools2.1 Part 4: Analysis/Log Files Part 5: Advanced Tools Part 6: PreInstalled
Scripts, Extras, and Cpanel Options Part 7: Fantastico Detailed Cpanel Tutorial Part 2:
Useful Site Management Tools In this tutorial I will, in detail explain all of t...
Php Spy Code
- Spy on your site! (21)
Code Spy Code Description Anyone who comes to ur forum's IP Adress, Site they came From,
Their Browser and the time they came will get saved in a place that only the admin knows the
location of... V.2 More features coming up in V.2!!! POst suggestions/problems... Preview:-
http://s15.invisionfree.com/Spy/index.php ? REFRESH THE PAGE, AND GO HERE:-
http://h1.ripway.com/programming/spy%20code/spy.html ^^^^^^^That shows all the IP's, Browsers,
Time, site and stuff....^^^^^^^^ Code First of all, you'll need to host the files.... I
suggest you make...
Php Menu Bulding Script And Site Template
- available for download (0)
A Php Menu-builder Tutorial This Sidebar Menu-builder code and the php scripts are adapted from
a Tutorial on the Astahost.com Forum titled : CMS101 - Content Management System Design .
Since the original tutorial's author (vujsa) did such a marvellous job of describing the system
in the original Topic posting, I will not attempt to explain it here, rather, I invite you to have a
look at his Topic and learn from it. The Basic tutorial provided coding for developing a table-based
web-site template which used php includes and embedded data to create a &...
Not To Be Banned By Google
- Take care that your site is not banned (2)
/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /> Strategic search engine
optimization involves far more than keyword research, META tags and content. If you want to mange an
SEO program, you need to be aware of any issue that can affect your success. Domain name management
is one of the big factors. Effective domain name management is critical because you could end up
getting banned from Google and other search engines if you take the wrong approach. Why would
Google ban you? In the spirit of fair play and providing depth in its results, Google ...
Looking for whos, viewing, site, targeted, aim, users
|
Searching Video's for whos, viewing, site, targeted, aim, users
See Also,
|
advertisement
|
|