PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 14th, 2002, 03:06 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Log visited URL to file¿

I need a php script that will log a visited URL to a file.

For example, if someone visits http://www.mysite.com/user.php?UserName
Then "UserName" is logged to the text file.

I'm completly new to php so I don't even know the term to search for regarding the question mark in the URL (if that makes sense).

Any help on this would be much appreciated
Cheers

Reply With Quote
  #2  
Old July 14th, 2002, 04:35 PM
D1NGO D1NGO is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Perth, Australia
Posts: 221 D1NGO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Log visited URL to file¿

im not totally sure on this one, but pretty sure that you cant just have www.mysite.com/user.php?userName i think you have to have www.mysite.com/user.php?something=userName

but then logging it into a database, you go like this:

<?php
mysql_connect(host, user, pass) or die("Couldnt connect to database");
mysql_select_db(database) or die("Couldnt select database");
mysql_query("INSERT INTO table SET field = '{$_GET['something']}") or die(mysql_error()); // the $_GET['something'] finds the value that something equals in the URL
?>

hope that was of some assistance

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Log visited URL to file¿


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT