From List: Retrieving Most Recent File
From a directory listing can one retrieve the most recent file?
From the timestamp of creation or even last modification can you read the lastest file?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Using SESSION Info To List Recent Visitors?
I would like to add a recent visitor feature to my web page. Am wondering about the best way to do this, and am curious if anyone has any tips. Is there a feature with SESSIONS to see who is currently connected? Or do I just need to timestamp everyone and query that information? edit... And I just noticed that little check mark at the bottem left of the post window that says someone is offline or online. How the heck is that being done?
Retrieving Full Entry From Multiple Select List
I have a list box with multiple selects. I define the name as numList[]. I get the values from $picked = $_POST['numList']; It retrieves values for all those selected. If the entries are, say, First Second Third and the first and third are select then $picked[0] has "First" and $picked[1] has "Third". If, however, the entries are: First one Second one Third one Then the values are for $picked[0] and $picked[1] are "First" and "Third" respecticely. How do I retrieve the entire value and not just the first word?
Retrieving Contents Of Select List On Form Submit
On an HTML form, I have a select list that is fed dynamically with detail records when the master record is displayed on the form. There is also a second lookup list, and want to allow the user to dynamically select from this list and add to the first list. I also want the user to be able to dynamically remove from and reorder the first list. I think I can do all of this with JavaScript. The question I have, is how can I retrieve the contents of the first list when the user submits the form? I need to get it back into a php array so I can update and add the proper database records.
Retrieving A Zip File
I'm doing a sort of download center. Where the user fills out their details and then chooses the program they would like to download and the information is then entered ito a log file. So all this information is fed into a send.php file. What I'm looking is for the send to go to a thank you page and get the file that the user has requested. Code:
Retrieving Variables From Included File
I'm trying to use a variable created in a file I'm including from within a PHP script: include("http://www.domain.com/script.php"); echo $variable; // $variable still empty? The $variable is created inside script.php but is empty when I echo it from the calling script. Is it the way I'm including the script via http? I have to do this since it's on another server.
Retrieving The File Extension From A String.
I am have huge problems with this simple problem. I am trying to retrieve the file extension of a file from a string like I have string say "file.php" how do I get the .php out of that with out just saying it is .php like: Say I have a bunch of files that I might be using in actuallity it is infinite. So lets say the files it could be for now are: file.php file.htm file.html file.gif file.jpg file.css file.js If I don't know what the file extension is and I can't think of possible extensions. What would I do to retrieve the file extension on those. I'm thinking of maybe some function that takes the string and cuts off the first section of the string before the dot. Rather then cutting of the extension like strtok($value, ".");. Also you should note my host does not have finfo functions or there is one other function for gathering the mimetypes forgot what it was and can't find it now though.
Retrieving Specific File Info...
Ive got a file which contains the following data: <option value="13">African Nations Cup XXV</option> <option value="16">asd</option> <option value="7">Champions League</option> <option value="1">English Premiership</option> What Id like to do is get the maximum value, so 16. Ive used file_get_contents to bring the file into a string, but now Im stuck getting that max value out. Unless theres a function for this, I believe the direction I would need to take is collect all value numbers using some string manipulation function, throw them all into an array, and just get the max value of the array. Is there an easier way?
Checking File Existence Through A List Of File Locations Gathered From An Array
I've been trying to wrote a code to check the existence of some files gathered from a field in mySql database. And I am kind a stuck at a point where I get the file locations from the database but when it passes those locations to file exist it keeps telling me the file does not exist. Only first file exists the other 2 file does not exist to test if the code was working or not. Code:
Most Recent By ID Number
Is there anyway to get the 5 most recent links added by using the field ID that I have in my database?
Recent Php_sqlite.dll?
I use Sqlite extension with php 4.3 under Windows XP. Latest stable Sqlite release is 3.0.7 (www.sqlite.org) but my php_sqlite.dll works with sqlite 2.8 are there a recent version of php_sqlite.dll that makes me work with sqlite 3 or higher?
Echo Only The Most Recent Of A Product....
Right now I have a basic drop down menu which is populated by the MySQL database. Once the user submits the form they are taken to the results page that match their criteria. Code:
Finding Most Recent Record
i have a login system, that logs the time of someones login, and gives it an id every page that is loaded, is loded with when, who etc. and a unique id. what i want to do is similar to what happens here. if a user is inactive ( not requests for 10 minutes) the log him out or something. i understand this would be a cron, but maybe it could be int eh page request, and simply checks and redirects if necicary.
Deleting A File From Server Through A File List
I've been having trouble with this for a while. Ages ago I made an upload script that lets you upload to files/upload/ and then once you upload it, a piece of PHP will show the files in that folder. In the admin section of my page i'm trying to find a way to delete the files off the server without having to dig into the FTP and do it manually. Are you able to do that with PHP? Code:
Script To Show Most Recent Additions Only
I have a picture heavy website and I've recently set up a database to handle all the pictures I'm being sent. What I need is a piece of script that will allow me to show the most recent additions, probably the last seven days but limited to the most recent 5 or 10 entries. The way I would like to do it is have hyperlinked thumbnails displayed which you then click for the bigger picture. Also, is it possible to implement a counter that will register a hit everytime a picture is viewed?
Looking For Recent Visitor Code Examples/ideas
I am working on updating my content management page and wanted to overhaul my "recent visitor" code. The code that tracks who has been and is still on my pages. I have not been able to find some examples I saw here a few months ago and was wondering if anyone could point me to some examples. The more versatile the better.
Get Most Recent Row On An Inner Join Mysql Query Based On Date
Here is my current query: SELECT tbl1.id, tbl1.username, tbl1.status, tbl1.joined, tbl2.timeDate, tbl1.directory FROM tbl1, tbl2 WHERE tbl1.id = tbl2.users_id GROUP BY tbl1.id This returns their oldest ie first login. I use this for analytics on the backend to determine user activity. So I would like a query that instead that returns the most recent tbl2.timeDate.
MD5 Encrypt A List Of Password From A File
Does anyone have a php script that would allow me to encrypt the contents of a txt file? I have an excel file which has a list of usernames and generated passwords. What I would like to do is copy out the plaintext passwords to a txt file and then do a conversion to encrypt the passwords using MD5 encryption as they will then be imported into a MySQL database. Is that possible? I can do them one at a time using a small php script but I've approx 100+ to do.
Get A List Of File Names From The Server
im working on a flash interface that needs to call a script that reads a directory on the server and returns the names of the files that are there. what would the php command look like that would get the file names?
Member Area With Dynamic File List
I have an Apache 1.3.31 with PHP 4.4.1 available and want to create some kind of "member area" with a per-user or per-group listing of files that can be downloaded. How would I do this? At present I just protect the individual files using .htaccess and .htpasswd files and give out direct URLs to the files together with username/password. What I'd like is some login functionality where people can log in using their username/password and then find a list of files they can download together with additional information individually tailored for that user.
Remove File Extensions From A Directory List
I'm running a small script which lists files in a directory by last modified and with under scores in file names replaced with spaces. I'd also like to remove the file extension, but cant figure out how. I found this code. $ext = substr($value, -4); ....though i'm unsure how to implement it PHP Code:
Flat File List Style Menu
I'm trying to build a Menu Building out of flatfiling with a section to add new areas to it. The idea behind it is to have a header for each section (as the top order list item) then each one below is a link of that category. I already figured I'm buillding it with limits (20 items Max per heading) and that to do it I will simply have each Heading/links in it be a new row in the document. example row Tips tips.php Tips on Php, file tips File Tips tips/files.php, etc etc With the first item of each row being the Heading and each other being the ones under it My question is What delimiters should I use to seperate in the row (I need to separate each item by 1 delimiter and then in each row separate the href, alt, name) Secondly for rewrtiign it should I simply write it so each time it rewrites the whole file or should I try and do string replacing and do modify sorta deal.
List Contents Of A Folder, Make List Of Links
Does anyone know how I can write a script that: - reads in all the files in a particular directory - displays the file names in a html list and makes a link of them: <ul> <li><a href="filelocation1">filename 1</li> <li><a href="filelocation2">filename 1</li> <li><a href="filelocation3">filename 1</li> </ul> etc.? So basically it creates a list of links with the contents in that directory, so you can download them from there.
Get List Of Messages From One Table, Message List Indicator From
I have two tables. One has a list of messages left by users using fields named mbxno for the mailbox and msgno for the message number. I have another table that has mailbox settings for each user that contains a field named "messagelist" to indicate if they want to be included on the message list or not. What I'm trying to create is a list of the most-recent messages with a lookup on the users table to indicate whether a message in the list should be included in the message list based on the user's mailbox settings. SELECT messages.msgno, messages.mbxno, users.messagelist FROM messages, users WHERE (users.messagelist = Ƈ') ORDER BY msgno DESC LIMIT 100 What I'm getting, though is a list that looks like this: mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 I think what's happening is that I'm using the wrong type of join and more rows are being created than necessary. If I add "DISTINCT" to the query, I get a list of the most-recent messages as I expect, but the "messsagelist" value is sometimes wrong (again, probably because the data is getting jumbled). For example, the messagelist value for the second row (2214) should be 0, not 1. mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 2214 msgno: 0412141622 msglist: 1 mbxno: 2189 msgno: 0412141408 msglist: 1 mbxno: 0000 msgno: 0412141213 msglist: 1 mbxno: 0003 msgno: 0412141213 msglist: 1 mbxno: 2265 msgno: 0412132029 msglist: 1 mbxno: 0000 msgno: 0412131950 msglist: 1 How should I be doing this? If nothing else, what kind of join will work with a long list compared to a value from a short list?
Mailing List Manager, Send To List
I'm looking for a mailing list script (php) that has a function to let users to reach out to all recipient on the list by simple send the email to a specific maillist- address. Mailman has this functionn but as a just got a webserver account I can't use mailman nor install it.
Dynamically Populate Drop-down List And Dynamically Include Html File
We have a drop down list on a PHP page, with several product names, and when people click one item, we will refresh the same page with the product name as parameter, and in turn we want to include a HTML file into the content area of the same page. I know it is recommended to put everything into database, but we want the web site to be very "portable", so the drop-downlist and the content should both in text files. Let's say the drop-down list will be poplulated from the product.txt file, and there will be a file for each corresponding item in the drop-down list. From the user point of view, if he wants to add a new product, he will just need to open the product.txt file, and add a new line with the product name, "Laptop", then add a new text file named "laptop" in the same folder which contains the HTML fragment to be included in the content area. What is the easiest way to do this?
Retrieving HTML
I was working on php script that could pull content from another site, and post it on mine. Some of the HTML from the site is not needed and I would like to remove it. How would I remove some of the HTML but keep that part that I need?
Retrieving NT User ID
Does anyone know how to retrieve the NT user id that someone is logged in as? System is running IIS. Have tried HTTP_AUTHENTICATION but that doesnt appear to work under MS - unless someone knows a works around. Alternatively - how can I retrieve a UNC pathname for a specific drive mapping.
Retrieving Records With Between
I am trying to convert my asp website to php. So far so good, but I am having a problem with my SQL Statement that needs to us the Between. Here is what I am using: $sql = "Select * From tblTrack Where DateEntered Between $start and $end"; the vars start and end come from the same form. I don't have a problem when I hard code the dates, but when I use the variables, it won't retrieve anything.
Retrieving URL's
I'm assembling a search spider, and codes from other search scripts look way to hard to understand, so I'm assembling one right now. My question is, could someone show me a very brief example, of how to get all the URLS into an array. Then I just use for() or foreach(), but then I need to know the function to get the file size in kb. How would you do that if you were to use a directory?
Retrieving Full Url?
Is there any way to pull from a variable of some sort the full address in the browser. Including any get variables currently there?... I ask because I have a number of different things, filters and such that should be compounded on each other. example. user has selected to filter a page by some field, user name or whatever depending on the data, then they choose to delete a record... etc. there are many uses i see, very possible with a lot of tweaking, but i thought there might be an easier way.
Retrieving InnerXML In PHP DOM
I'm trying to return the inner XML from a DOM element, but I can't find any methods that allow this. For example, if I have a string: <TEXT>Here is a string with <B>bold</B> text in it</TEXT> then I want to return the enclosed string _including_ the <B> tags: "Here is a string with <B>bold</B> text in it" Using get_content strips out the tags. "Here is a string with bold text in it"
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".
Retrieving Max Numeric Value.
I can't see anything wrong with this code at all. Trying to retreive the last(highest) id from the text_id column which is auto-increment and primary key. The conncetion to the DB is fine and working. It appears that the result isn't being drawn though... any ideas? Code:
Retrieving Database
User choose on ID and submit. I use the URL query method to get the ID and rest of the profile like first_name, last_name, I tried something like this $query = "SELECT * FROM user where user_id= $ID"; echo $_get['first_name']; but it doesnt show, how come?
Problems With Retrieving Url From Database
I am having problems with retreiving the url of the avatar that the user chose, which is stored in a database, and then diplaying it as an image. I have no prob's with the query:
Retrieving Field From Mysql With Php
I want to select as in the code, an email matching a username, and after I want to make a variable called $email_a to send to this user an email. What is the way to retrieve the email address from the database and insert it into the variable? $query = "SELECT email from users WHERE username = '$username'"; mysql_select_db($db_name); $result = mysql_query($query, $connection) or die ("Error in query: $query. " . mysql_error());
Retrieving Cookies (Opera)
I have a script which sets a cookie which is a history of Mysql queries a person has tried. My problem is that when I run a query 'show tables' when I retrieve that value from a cookie it is stored as 'show=' instead of 'show tables'. This only happens in Opera. Everything is fine in IE and Netscape.The script is in Python but I am hoping someone using PHP has had a similar problem.
Retrieving The CLient IP With Php4.2
I am runing php 4.2 on an apache server. I'v tried several things in order to get the ip address of my visitors, the problem is none of them work. I'v looked over the phpinfo() output several times and found nothing that would provide me with that info also I tried several examples using getenv() and none of them seemed to work. I remeber doing this easily with older versions of php. What changed?
Retrieving NT Logon Name For PHP Authentication
I am in the process of developing an web-based helpdesk system for our Intranet, I would like it if the user did not have to logon to the helpdesk system, but was automatically logged in using the username they logged onto the network with. I'm pretty sure this is possible with PHP, but just haven't discovered how for our setup. Running Apache w/PHP (not our NT server), users use both Win95 and 2k.
Retrieving Hyperlinks From Access
does anybody know a simple way of retrieving a hyperlink from an acces table. After retiving the data array with odbc_fetch_into()the hyperlink is returned as "hyperlink name#..path of document#. maybe sombody has already solved the problem and can save me hours of programing.
Retrieving An Image If Condition Not Met
I'm sure the answer is simple, but the solution is eluding me-I'm not too good at the particulars of scripting. Maybe someone can point me on the right path... Here is the problem: I have a string of php code that retrieves an image, in this case, an image of a book cover from Amazon.com. This works perfectly well, unless, there isn't an image of the book on Amazon's server. When there's no image, a blank hole appears on the final page. What I would like to happen is, if the variable for the image isn't met (i.e. no book cover image), a "No Image" image, from my server, will load in its place. Here is the code that retrieves the image: <img border="0" src=<? echo $i['ImageUrlSmall'];?>> Is there a way to include a command that will retrieve an image from http://www.mysite.com/images/noimage.gif if the first condition is not met?
Retrieving Form Data.
I have two scripts - common.php and edit.php. The working is that common.php contains a form that is used initially for registration and later used again so that registered users can edit their information. edit.php contains the connection to the db to update the form with the current users information. PHP Code:
Retrieving An Object From An Array
I have an array of objects, and I would like to retreive one of the objects based on a given key and value (ie. name='john'). Is this possible and if so what is the syntax?
Retrieving Data From Session Id??
This is what I have done: on Page A: <a href="<?php echo 'pageB.php?item=docs&sSID='.session_id(); ?>">Docs</a> on PageB: <?php if ($sSID) { echo $_SESSION['username']; // THIS IS WHAT I WANT TO READ HERE switch($_REQUEST['item']) { case "docs": echo "doc files"; break; case "reqdocs": echo "other files"; break; case "misc": echo "miscellaneous files"; break; default: echo "Invalid query"; break; } } ?> As you can see on PageB, I tried to read the value of $_SESSION['username'] but it gives nothing. The session file is correctly created in my /tmp folder with the username field containing valid data.
|