Get User Information
Hi,
how do i get some information about my visitors?
Things like IP, Operating System,used browser, referrer url and so....
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Collecting User Information
What methods do we have of collecting information about browsing history? We would like to see the last few links that a client followed, prior to entering our site. I thought $_SERVER[] object might have something like this, but I haven't found any details, yet.
IP Address Information From The User?
Can a php program get IP address information from the user? I see sometimes eg your ip address is this and your OS is this. Can I run a script to get this information and to display on a webpage. So the user knows I know about this information.
Tracking User Information
I'm having some trouble with tracking user information. I'm currently stuck with the forums on my gaming website, i need to track what topics have been read by the user and wich topics are yet to be read. (e.g. newly created topics appear as "not read yet" to whoever hasn't read the topics). I've tried numerous way's to do this with sessions but it didnt turn out very well. I see boards everywhere displaying correctly wich topics i haven't read yet and wich i have read already. Any idea's on how to do this?
Maintaining User Information Throughout Session
Ok guys, you have been so helpful in the past. Here's another one for you.. I am developing a protected section of my companies website where customers can register and obtain access to forums, whitepapers, etc. I have developed the login page, profile pages, etc, but one thing I dont know how to do it make sure that as long as my user is logged in, if they click on the "Profile" link, they will see their, and ONLY their user profile info. I am investigating global and/or session variables to keep the 'userid' field in memory throughout the session and provide me with a way of always identifying the user. Am I going down the right path? Any suggestions on where to look, ie - tutorials or something?
Advice About Fetching User Information
I have this content management system I've developed myself. The system has a solid community part where members can register and then participate in forums, write weblogs and a ton of other things. So, in instances where I list, for example, the latest weblogs. I list the headline of the weblog, the date and the name of the member who wrote it. Now, the name isn't just "Smith", but rather Smith's online status, his nick and his "label", and can look like this: <imageSmith M:34 The image is either a green or red dot depicting his online status. When I want to display this, I use this function: print member_name(12); With 12 being the id number of Smith, and the only information about the writer of the weblog (i.e. I don't save his nick or label in the weblog post, and certainly not his online status). So, when using member_name() I look up the id 12 in a prefetched array of members, displaying the correct information. In a compact format: ## index.php require_once("member.php"); print member_name(12); ## member.php $q=mysql_query("select id, name, label from members"); while ($r=mysql_fetch_assoc($q)){ $GLOBALS["members"][$r["id"]] = $r; } function member_name($id){ $m = $GLOBALS["members"][$id]; $online = in_array($id, $GLOBALS["surfers"]) ? "on" : "off"; return icon("online/$online") . " $m[name] $m[label]"; } ## So, whenever requiring member.php, all members are prefetched and put into $GLOBALS["members"], which has worked just fine. Then I have infromation about any given member at my fingertips. But now I have some sites which are beginning to get a pretty large number of members, so prefetching them all becomes timeconsuming (sometimes up to one second, which is unacceptably slow). I can't fetch information about each single individual at the point of showin his or hers information since there can be long lists of for example weblogs and there might be 40-50 member names to be shown, which would result in 40-50 seperate mysql requests, which would flood the MySSQL server, I'm afraid. So, my question is this; what other way can I do this in? Is there a faster way to read thousands or even tens of thousands of information points and put them in an array quickly? Or is there a better way to read information about single members at runtime? Aggregation is most certainly an option. Can I write a tab separated text file and read that one in member.txt - would it be faster? Should I write one text file per user and read that file when needed? Anyone got any experience in doing this? How did you solve it?
Adding User Information To A Form
I need to be able to take some user details on one page and then be able to put the information gathered onto another page that already contains another form that has been created by a javascript cookie program. Thing is i need the initial user information captured to be 'pasted' in to the final ordering page and to remain there (so that more products can be added) without the user having to re input their details again. I have just started with PHP and know that i can set up a form and that PHP can print the variables from the form , but how do i get those variables to remain fixed in the next form and be able to let users go to other pages within the site without losing the data?
Updating User Information Php/mySQL
im fairly new to the incorporation of php and mySQL and i am looking to start off by making a user info database that will hold contact information as well as a username and password field. below is the code for the site i want to use to allow the user to "update" their info. My problem is when i click the link to "edit" info after the user has logged in, the page displays blank. Code:
Capturing User Login Information Of Windows
I want develop the intranet site with seamless authentication. Is there any way to capture only the user name who has logged in the windows machine. Iam using PHP 5.0 MySQL and IIS Server. I have tried with $_SERVER['LOGON_USER'] but its returning nothing.
PHPmyadmin Access Denied For User 'user'@'localhost'
WinMe machine as server, with Apache 2 installed and working PHP4 installed and working ( had PHP 5.05 installed and working, but i couldnt get the mysql extensions to load - phpinfo() didnt list mysql :(, so i installed PHP4, which now lists mysql when i run phpinfo). MYSQL 4.1 installed and working. I dont know the console commands too well, but i know its working ok, cos I have used a few simple DOS prompt commands to check its alive and I can connect to the database using MyODBC frontend/driver 3.51 and also using Navicat 2004. When i try to connect to the database via PHPmyadmin from another network PC I have an error: #1045 - Access denied for user 'user'@'localhost' (using password: YES) I have played around alot with different settings in the config.inc.php file.... nothing seems to work. This almost appears to be a simple login problem ( probably is too), but I can access the database locally from the Winme machine with the username and password that wont work over the network! I have tried not using 'localhost' as the host name but the IP address of the Winme PC but I get this error: #1130 - Host 'MYSERVERNAME' is not allowed to connect to this MySQL server
Notice: Use Of Undefined Constant User - Assumed 'user'
I have a script for a shopsystem on a Linux. There it works fine. But when I try to run it on my Windows machine, PHP says things like Notice: Use of undefined constant dbname - assumed 'dbname' in c:apachehtdocsaposhop estshopclassesxxx.clas s.php on line 77 On Windows I run PHP 4.3.2 On Linux runs PHP 4.3.1
Authenticating User Common User Names
I want to create a password protected page with PHP and Mysql. I have 2 groups User and Admin. The respective groups have a common user/password. The user/password are stored in a database. I want to authenticate the user through a login form and not through a pop-up ($PHP_AUTH_USER) way. What I want is, if a user logs in and he moves from one page to another, he should not be asked for validity again. Is this possible only with scripting (without session and $PHP_AUTH...). If yes - how do I keep track of an authorised user and unauthorised user, so that he should not be validated again. Does setting the user variable to global in all the pages do the trick.?
User Authentication And PHP Saving As Specific User.
the users of my server had to upload their pages by sftp and only the user who uploaded a page was able to edit itafterwards. I've been asked to make a secure way for users to log on through the web and edit their pages online. However, although using .htaccess to authenticate users, the script saves as user 'nobody' and is not able to edit pages previously uploaded (and saved as user 'john_doe'). What I am trying to do is make the script save using the same username as the user used to log on.
Fill Fields When User Selects User From DB
I have a field with a selectbox which contains a list of client names and several other fields which display information from the DB. I need to be able to make the fields change to the appropriate information when a user is selected from the select box. Can anybody please give me an example of a bit of code that will do this?
Getting URL Information
Can someone point me to a document anywhere in the Internet where it tells me what are all kinds of information I can get from a URL. Specifically, the ones that are possible to deal with PHP. For example, I can find out the IP address or the URL's host's location.
IP Information
As part of my statistical analysis of the visitors to my site, I record people's IP address. Is there an easy way to get more information (where people are from, maybe even long. and latitude) or perhaps translate the IP address into a named address?
Get Pc Information
How do i get the browser type from the user. I want to display this information on my webpage. I can get the IP,OS of the user already.
How To Get Information From Url
I am using the get method on my form to send information to my proccesing script, but i don't know how to take the information from the url and so that i can search for it in the database using a piece of code like this, $sql = "SELECT * FROM items WHERE id=$art"; Can any one tell me how to do this.
Get Information From Server
I have a script that is used to email a lot of persons in an easy way. You load the script and select a file from your that contains all the email addresses from your own machine. I would like it to be possible to just click a check button or something and load a preset file from the server, this would make it a lot more user friendly (not to mention secure). The problem is that I do not know how to incorporate this in the script.
How To Get Client's Information?
I'm working on a website hit tracking appilication, in php we can use REMOTE_ADDR to retrieve the client's IP address, but how do I get its isp server (domain)? For example, the domain: pcp08721939pcs.norstn01.pa.comcast.net is associated with IP: 68.32.198.43 How can I use php functions to get 'pcp08721939pcs.norstn01.pa.comcast.net'? Anyone can help me out?
PHP Cookie Information
How do I read the expiration time for a cookie? I understand that reading the value of a cookie is just $HTTP_COOKIE_VARS["CookieName"] but is there a way to read when it expires? What I'm trying to do is make a login with a "remember me" option. So if you choose "remember me" the cookie is permanent, but if not it expires an hour after you are done with the admin section of the site. So I need to keep updating the cookie to expire after an hour, but only if it is set to expire less than an hour from "now".
Sorting Information
I have a script that completes a mysql query and displays all the information & all works fine The problem im having is that i only want it to display the information i tell it too ie... there are 3 people with an age of 40 and the rest with various other ages, can someone point me in the right direction to get the script to display only those who are 40 & ignore the rest...
Passing Information
I'm needing to work with a bar code scanner and have come to realize that after scanning a barcode the unit actually does a hard return. What is the best way to variables from one page to another. I was thinking of creating 5 pages of for input and the last one would have the submit button. I just don't what would be the best way to pass the variables from page one, two, three.. etc to page 5. Thanks for any help you might be able to offer.
PHP Variables Information
I'm pulling a variable out of our LDAP. How can I see the full lenght of the variable? I'm trying to write a script to allow/disallow based on username. It appears when I set the username variable from the LDAP information there is some white space I need to trim. And if there is, how do I trim in PHP?
How To Get Information From Web Page?
I am now writing a programme that can get information from web page. That is; The information which I need is on a page and it will be update now and again. So I need to get the information automatically at certain time.
Parsing Information From .asx
I am trying to extract the artist, title, etc. from this .asx stream: http://www.sirius.com/asx/6lu9ladr/starlite.asx I understand .asx is Windows code, but I assume this still may be possible. Where can I begin to figure out how to do something like this?
Extracting Information
Does anyone know where I should start with this. Im trying to extract the information in: $_SERVER['HTTP_USER_AGENT' But I dont know how to get the information out? What functions should I be looking at. I want to get the OS, Browser, IP etc..
Login And Get Information
I would like to make a script that can log in to another webpage, and enter a second page, and then get the HTML there, and then save it to a DB/file. The login script is like this:
Get The Different Information In A Field
I have a field that has only 4 different information, lets say that the field's name is "color" and it has 4 different information that are: red, blue, green and yellow. How can i get those 4 or more colors out of the field with PHP?
Retrieving Information From URL
I want to make it easier for a user to get to a comment on my page and to be able to go directly to that comment when it is typed into the URL. For example, instead of this: http://www.mysite.com/comments.php?id=1 I want them to be able to do this: http://www.mysite.com/1 I am just wondering how to retrieve the "1" from the url instead of having to type id=1 and store it into a variable. I know that the second one is pointing to my homepage instead of comments.php, and thats fine. I am just going to redirect to the other page or include the other page after I retrieve the "1".
Getting Information From An Array
I've got a problem with an array, and I'm not sure exactly why my script isn't working.I'm pretty new with arrays, so that could be the reason right there. My script look like this function getconfig($getkey){ return $currentconfig[$getkey]; } In the array, the online key is set to 1. I am trying to get the 'online' key, so I use getconfig('online'); but it doesn't return anything.If I use print $currentconfig['online']; it prints "1".
PHP Not Outputting Information
I am trying to pull info from a MySQL dbase with a simple script that recieves info from a get request such as http://mysite/subfolder/index.php?where=Alaska The code for the request is as follows Code:
Php Collapsible Information?
Would it be possible to create a page using php that basically a user could click on and it would expand to show more information a bit like the javascript menu's that are available but in php if possible. same sorta thing that clicking additional opptions on creating a post works??
Access Quota Information With Php
Actually i'm looking a way to show email quota information like yahoo di in my squirrelmail i try to do from shell, ex: $ du -sh asiah 1.8M asiah is it possible to show that information to browser with php , since i have try to use : <?php $tes= exec("du -sh /mail/raka.com/users/asiah"); echo $tes; ?>
Cannot Add Header Information - Headers Already Sent
I've got this annoying error: Warning: }Cannot add header information - headers already sent by (output started at c:program filesapache groupapachehtdocsdevadminauth_user.php:2) in c:program filesapache groupapachehtdocsdevadminauth_user.php on line 16 Trying to get my head round this one, but to no avail. Basically I've got this login script, its a HTML file, and when you login in, and you've not entered anything I've used the header function to re-direct the user back to login section, and if the user if sucessful, I would like them to go to the next section, again using the header function. Can someone point me in the right direction, if ((!$username) || (!$pass)) { echo "Username and Password must be entered"; header("location: http://localhost/dev/admin/login1.html"); exit; } $result=mysql_query("SELECT * from user_addition where username = '$username' AND password = password('$pass')"); // check for any results from the query by counting number of rows returned in the result set $num = mysql_num_rows($result); // if number of returned rows is more than 1, a match was found if ($num != 0) { echo "1"; header("Location: nextsection.html"); exit; } else { echo "INCORRECT"; #header("location: http://localhost/dev/admin/login1.html"); exit;
Website And Tracking Information
i need some information on how you guys would go about making a website that could give you information based on a number you put it. This information will be tracking information on a particular package. The number will be a given number that corresponds with that package. Basically, all the files are dbase files that need to be converted into something readable. I then need to be able to use php or something to search through the readable information from the dbase file and then put it on the screen for the user looking for the tracking information. How would you go about this.
Warning: Cannot Add Header Information -
Everytime i try to use headers on win2k/apache/php4 i keep getting errors. I dont have a clue why i get them.. but anyway, i use this code(from webmonkey): <?php // File Name: auth02.php // Check to see if $PHP_AUTH_USER already contains info if (!isset($PHP_AUTH_USER)) { // If empty, send header causing dialog box to appear header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.' exit; } else if (isset($PHP_AUTH_USER)) { if (($PHP_AUTH_USER != "admin") | | ($PHP_AUTH_PW != "abc123")) { header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.' exit; } else { echo " <P>You're authorized!</p> "; } } ?> and when the output i get in my browser is: Warning: Cannot add header information - headers already sent by (output started at grogram filesapache groupapachehtdocsschildmain_admin.php4:2) in grogram filesapache groupapachehtdocsschildmain_admin.php4 on line 5 Warning: Cannot add header information - headers already sent by (output started at grogram filesapache groupapachehtdocsschildmain_admin.php4:2) in grogram filesapache groupapachehtdocsschildmain_admin.php4 on line 6 Authorization Required.
Warning: Cannot Add Header Information
Warning: Cannot add header information - headers already sent by (output started at functions.php:1) in /home/victor/www/cart_action.php on line 89 cart_action.php is a php file without interface but just doing re-direction using Header(). functions.php is a file contain inside cart_action.php which do not have any interface but contain several functions written by me. This happen suddenly, and I am very sure that I didn't output or echo anything before the header(), what is the possible problem like?
Cannot Add Header Information - Headers Already Sent ...
Hello all, I'm very new to PHP, and have been desperately trying to make the submit button on my form redirect to a confirmation page. But the header() function keeps giving this kind of error message: ---------------- Warning: Cannot add header information - headers already sent by (output started at /customers/mydomain/mydomain/httpd.www/mysubdomain/header.php:1) in /customers/mydomain/mydomain/httpd.www/mysubdomain/mail2.php on line 5 --------------- My code looks like this in the header of mail2.php: ----------- <?php if ($_REQUEST["Submit"]) { header("Location:confirmation.php"); $Email = $_REQUEST['Email'] ; mail("me@me.com", "Newsletter", "From:$Email"); } else { } ?> -------------
Php 5 Information, Tutorial, Book, Etc
I have worked on php for the past 6 years off-and-on and I was planning on making the conversion over to 5.x and I understand there has been a lot of changes from 4.x. Based on this, I was wonder if you could suggest a book that highlights the changes with examples as well as a site or two that would help with this. On another note, I would like to know how you guys seperate and tier your applications in php (I have been working with .NET in which we used a 3-tier). Do you try and use 3-tier, 2? How do you pass around the connection in php when you seperate the code (use some type of global or always pass the connection)? Etc?
Where To Find Pipe Information?
On a Linux platform, I have the need to call a compiled 'C' program from a PHP script (to do some special authentication), and to keep the information passed from the PHP script to the compiled 'C' program secret, i.e. the information should not be passed on the command-line. The PHP pipe manipulation functions (such as popen) were suggested to me. Where can I find out more about pipes, specifically: a)How to use the C library calls to manipulate pipes? b)The Linux API (below the C library)? I need enough information to write the compiled 'C' program, to exchange information with the PHP scripts via pipes, and to handle exception conditions. I'm just not sure where to look ... I'm not even sure if the C library is documented ... and which documentation is appropriate.
Information Regarding $_Session And Extract
I am new to PHP. I would need some information on the following: 1. a) I wanted to know from where the data is extracted and stroed in the global assocoative arrays ( specifically what will be the contents of $_Session ?) b) Is there any way by which i can get to know all the keys of the arrays ( specifically what are the Keys of $_Session ?) extract($_GET); extract($_POST); extract($_COOKIE); extract($_SERVER); #extract($_SESSION);
How To Capture Cookies Information
I want to find out how do I capture user cookies information for traffic analysis on Windows machine and server cookies from Linux server.
Checking Information In An Array.
I have a function which reads a csv file into an array from there I want to check if a value is in it. Basically the csv files look like this: 23123233123,name,some@one.com 23423412213,name2,some2@one.com 211111,name3,some3@one.com My function looks like this: function read_csv($filename, $delim=',') { $row = 0; $dump = array(); $f = fopen ($filename,"r"); $size = filesize($filename)+1; while ($data = fgetcsv($f, $size, $delim)) { $dump[$row] = $data; $row++; } fclose ($f); return $dump; } $csv_array = read_csv(csvfile.csv); I would like to now seach the array to see if a value is in there and do something from there with it. if (in_array(211111) == "true"){ echo "Your already in the file"; //note don't write to csv file } When I try to check to see if the value is in there It never tells me true so I can run the commands that I want from there.
DIY Enterprise Information Portal
Has anyone tried reverse-engineering Netvibes and placing Zend Framework on the back end to implement an enterprise information portal? Maybe do a Save As with your Netvibes page and Posh http://www.portaneo.com/solutions/en/opensource.php as a starting point...? I figure it'd have the enterprise stamp of approval if it had ZF on the back end.
Storing Information Without Cookies.
I am trying my hand at writing a forum in PHP. I wanted to know how is it possible to save information such as the visited threads so that the correct icon is displayed. I know how to do this using cookies, but how can I do that without using them so that when a member deletes cookies from his system, his activity information is still preserved?
|