Get A List Of Files On A Website
I need to get a list of all files in a particular virtual directory on a web site, such as - http://www.myServer.com/FileStore
I tried using the directory functions, but this doesn't work.
if($dirHandle = opendir("http://www.myServer.com/FileStore/")) { while(false !== ($file = readdir($dirHandle))) { print($file."<br>"); } } closedir($handle); }
Is there a way to do this?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Protecting Mp3 Files On Website?
I have a website where I host guitar lessons. I force people to register in order to listen to audio. But I don't think I am using a good method for protecting the files and preventing people from reverse engineering to figure out the link. For instance, the files are located at www.mysite.com/myaudio/ Here is the code I use to process the the audio links: function GetLink($exid, $type) { if ((!pnUserLoggedIn()) && ($type != 4)) { session_start(); $_SESSION['lasturl'] = getenv("HTTP_REFERER"); include("header.php"); OpenTable(); echo "You must be a registered user to access lesson audio. You can <a href = "user.php?op=register&module=NS-NewUser">register</anow for free."; CloseTable(); include("footer.php"); return; } if ($type == 0) { $result = mysql_query("select url, file from nuke_mainlessons_exercises where exid = $exid"); list($url, $file)=mysql_fetch_row($result); if ($url == "") { $link = pnGetBaseURL()."$file"; header("Location: " .$link); } else { $link = "$url"; header("Location: " .$link); } } } After the command is successful, Media Player laucnes and shows the name of the file. So if someone knows the file is at www.mysite.com/myaudio/ then they can just append the audio clip name to that url and access the audio. What is the proper way to do this?
List Certain Files In A Dir
I am working on a news script were my members can post what they are currently working on. I have a dir were all of there images are going to be uploaded, and I need to know if the following is possable to do. $username = the members name selected from the database $projname = the projects name selected from the database What I want to do is select only images with the filename containing the info. The filenames are like this: TheBlackshinobi_3dmountain_1.jpg TheBlackshinobi_3dmountain_2.jpg TheBlackshinobi_3dmountain_3.jpg
List Dir And Files In Sub Dir
I am trying to make a script that list all of the files in a directory and then if the file in the directory is a sub Directory it will list the files in the subdirectory. If anybody would have a clue how to do this or where to start, please tell. Also in the end i want it to check file dates and delete them if they are older then 3 days, but i dont have a clue where to start on this.
Php Foreach Dir List Files In Dir
I've got some code to loop through a directory and it's sub directories and bring back a list of files and folders. What im wanting to do is have this in a state where i can put all info into a database so i can quickly index and then see what files are in what folders. It's all my security camera triggerd avi files. The following code will loop through an give me an array of files and folders Code:
How Does One Get A List Of All Files In A Folder?
need a list of all files (i have like 5k or so) in a folder, I need to add there names to a table I am doing this so i can compare two tables table 1. comments added to uploaded pics -finished pictures- table 2. no comments added yet to uploaded pics (so they can be commented on GET IT?) -unfinished pictures- All the pictures are in a single folder for the time being i'm going to be making a form based on the pictures that are on table 2 so that they can have comments and titles and file name added to table 1 (to be done still) but i need to know all the file names for the folder in question, i guess i could do it via cmd line ls or something like that, i'll get back to you.
List Php Files In Directory.
I am creating a plugins folder that I will use to store php files. I also store other folders within that "plugins" folder. The problem I have is getting the script to read only the the .php files and skip subfolders. Plugins[main folder] ->plugin1.php ->plugin2.php ->screenshot[folder] ->downloads[folder] How to keep the script from checking the folders (screenshots, downloads..) This part of my script filters the main folder and parent but not subfolders if ($file!= "." && $file!= "..") { How do i get that code to not check subfolders.
Dropdown List Of Files In Folder
I am preparing a form that includes a drop-down list consisting of the names of files in a certain folder on the server. I only need to trap the file name (jpg), not the path and I'm not trying to upload the files or anything - simply allow the user to select one of a number of different image files (they're actually location maps).
How Do I Edit A List Of Files Associated With A Product ?
-I wrote a script that you use it to add products in the database. -Each product is associated with files. -In the Form to add the product you have to enter the product name in a textfield and below there are $no_of_add_file filefields. $no_of_add_file is an integer that determines the Maximum number of filefields that you want to associate/add for each product. So it succesfully adds the product and the files in a database and the filesystem. The problem I am trying to solve is how am I going to edit those files in the product. If you know what I mean... and you have done something like that or you know a url or script that does that, pls let me know. What I need mostly, is not the PHP code but the logic and what are the possible ways of doing something like that. In the database i have two tables that this script needs: One is the products and the other the files. Products : product_id, product_name Files : file_id, file_name, product_id
Generating A List Of Files On Another Server
I have been messing about with the folder / file functions on the php.net website but they all seem to be for local folders. All I am trying to do is generate a list of files on another servers folder - so my variable to generate a list from would be "www.tnauk.org.uk/bbs/daily" but the script would be running on nimmox.com. Is it possible?
List Files In Directory Excluding Directories
I have the following code which I require to get the list of files in a given directory. However in that given directory I have other directories as well. I thought the second if condition was taking care of excluding the directories, but its not. I get a bunch of directories listed along with the files. PHP Code:
List Of Files Fetched Via Include() Or Require()
I want to be able to, at the end of an executed file, summarize what files it included and required (via include() and require()). I have a very dynamic script that depending on the situation handles several different files and scripts. To aid in developing, listing them would be helpful, to troubleshooting problems. Iss there a way to list all the files that have been included along the way?
Create PHP Pages From List Of Files In Directory
this is probably easy for a php pro... but I cant figure it out.. I have a directory of mp3 files named like this. Chevy_Car_Commercial.mp3 There are about 150 files. I am trying to find a script that will make php pages based on the file names. chevy_car_commercial.php And also dump that variable title Chevy Car Commercial into the <title> of the web page... I have made dynamic pages before... but that was using a form..
Ereg, Read The Dir And Print List Of Files.
I have a dir of html files that link to websites, i would like to read the dir and print a list of those files as a link. Which the script i have does. I would like to take this one step further and replace the ".html" extension with ".com" so it winds up being:
List Files In Directory For Apache Alias
I want to list the files in a given <dir> with a given file extension ... opendir() or scandir() would seem to be my solution. BUT! those files are outside the root dir of the site ... accessed via an apache alias. so opendir() and similar functions do not seem to work as I cannot feed it a relative path. is there a way to do this? my page: <http://myintranet/prodinfo/listdir.php> http location of dir to be listed: <http://myintranet/dailies/> /dailies/ is an alias pointing elsewhere on the server. indexing has been turned on for this alias in apache, so loading the above URL shows the dir contents by default. so for example ... this works because /images is in the root of the web dir: $myDir = "../images/"; $scanFiles = scandir($myDir); print_r($scanFiles); this does not work as dailies is an alias and not a dir in the web root: $myDir = "../dailies/"; $scanFiles = scandir($myDir); print_r($scanFiles); one option I see is to grab the html of that apache auto-generated index page and parse the content to grab the links out of it. but this seems rather roundabout, and with all the great php file tools, I'm hoping there's a much simpler way. does anyone have any ideas, or is there some addtl info I can provide to make my question clearer?
Change Website To Php,mysql Data-driven Website
At the moment this site is not completely php. How can I make the content of the pages be from a mysql database? and how do I make the nav buttons work correctly connecting to the mysql database and displaying the correct content, ?
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.
Including Files In Different Direcories That Include Files From Teirs
Okay, I made a simple AJAX shoutbox and I want to include it on all my pages. To insert the shoutbox I simply type <? include('/shoutbox/shoutbox.php');?> into my HTML page. The problem is, that in /shoutbox/shoutbox.php I also include settings.php, functions.php, and some other files, and when I include /shoutbox/shoutbox.php into my index page, /shoutbox/shoutbox.php tries to call settings.php from the same folder that my index file is in, since I just 'included' it in index's source. So my question is, is there any way, without using frames, to include a PHP file as it would be if you link directly to it in the address bar, but placed into another file in a different directory?
How Do I Hide Database Connection Files Using PHP Include Files?
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/, and /www/ht/ is the root web directory. So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and removed it form CONNECTIONS directory.
How Do I Hide Database Connection Files Using PHP Include Files?
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/, and /www/ht/ is the root web directory. So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and removed it form CONNECTIONS directory. Now it doesn't work. What do I need to change?
Creating Dir, Copy Files And Pass Variables To 2 Files
I need to create a folder on the server weekly named by the user. To this folder copy the contents of an /Original folder. Inside the new folder edit one of the files to insert a data with a XML path generated in another application, copied (via memory) and pasted within the very first form and passed to the file in question. <param name="FlashVars" value="xmlfile= $lanofile" /> the $lanofile is the value that I need to pass from the form to be read by this file. I have created an form (n.php) that POST the name of the folder to a second file (creatdir.php) everything is cool until I have to edit the third file. How can I pass the value of one of the formfileds to a second file and them read this value as a variable to be consumed as mentioned above? Or actually right whatever is on the third field to this position (not using variables).
PHP Website
Is the php website down. I am unable to access the documentation. www.php.net
RSS To Website
I have a client who has given me a link to some other websites RSS Feed , he want to display the data in his website from RSS FEED. Hoe to make this. Is it like reading the xml and displaying or is there some other way to do this.
Get Website URL
I've seen scripts which get the exact url to the path where I'm using this script. It gets the full website url with sub folders, etc.: http://www.test.com/... How can I do this in php?
Where To Get 'website Spider' Bot For PHP?
Hi, I have a somewhat weird request, but I have a legit reason. My new CMS is having performance problems, and we are trying to resolve the issue by implementing a bot or spider that grabs the HTML of the site every 30s. I was wondering if you guys could kindly tell me where to get such bots. The program will be installed on another server with cronjob to run every 15s. The 'website performance' check services out there are limited to 2 minute interval. I need something that hits the target site in question more frequently.
PHP Website Security
We have developed an ads network script for running ads network site. Can someone please guide us on security features that we must implement to prevent hecking and exploits...? We have looked into major security problems commonly known like image uploads checks but I would like to know more on other security checks that are generally over looked.
Set Two Cookies For The Same Website, But Not For The Same Url.
It is possible to set two cookies for the same website, but not for the same url? What i means is: you have 1 login form. Out of that loginform, two cookies should be set. One cookie should be set for yoursite.com. The other cookie should be set for subdomain.yoursite.com (like forum.yoursite.com). The information in this cookies will be different.
Website Picture From PHP
does anyone of you know a save method on PHP to relyably, maybe using other programs create scrennshots (thumbnails) of websites? I am the administrator of the open source project (at SourceForge) "TSEP - The Search Engine Project" (http://tsep.sf.net) and we might want to show pictures of the website our search engine has found. The generation process of the thumbnails should be pretty automatic (as much as possible) My tries to find an "optimal" solution did not bring any good results yet, so I am hopeing for better information here.
Backup Of Website
I am seeking after a backup script, to take backup of my webspace on my server, my server is www.servage.net i need to take backup 2 times per day. Via cronjob on www.cronjob.de but i have seeking i 2 days without reslut. Where can i find some webspace / serverspace backup scripts?
PHP Website Management
I have just bought a small website written with php & html. The vendors advised me that once I uploaded it to my website I could customise all the templates to give it whatever look I wanted. As a novice, I had no idea how difficult this would be - due to the fact that a php website is very disjointed. Can anyone tell me of any software I can download that will enable me to manage my website so that I can see the structure in it easily and make changes simply. (I thought I was buying 60 sets of templates but what I bought was a site with 60 pages).
How Can I Download A Website
I am not sure if this qustion is just for php expert: How can I download a website including all html, javascript, gifs, etc.
XML RSS Reader With BBC Website..
I have made an RSS reader and am testing on the BBC website, and I use this code to grab the contents of the XML file, however when I look at the contents grabbed by my function, and the HTML source of the bbc website XML, they are different... how is that even possible? Anyone have an XML parser that they could test this on please? Heres a sample link and my code: http://newsrss.bbc.co.uk/rss/sporto...ootball/rss.xml $ch = curl_init($feed); $fp = fopen($rss_name, "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp);
Script To Log Into Website
I'm looking for a script that will attempt to log into a website (ex. Gmail) and report back if it suceeded or not. I don't know if this can be done with PHP or another language.
Ad Rotation On A Website
I am having trouble looking for a script that will rotate images from a standard text file. I have a folder set up with two images that rotate every time the page is refreshed. They also have a hyperlink so that when an image/ad is clicked on it goes to the advertiserments web address. The only problem is that the path to the images and corresponding hyperlink are in a javascript file. Is it possible to reference them from a standard text file so that a non-techie can login to webedit pro and edit the image name and url everytime the ad is being changed ? The script can be java scrip or preferably PHP, once it can reference a .txt file...Im happy
Creating Pdf From Website
Woudl it be possible to create a PDF from an internet explorer view, using php? I would like to create a hardcopy (pdf) from a report, currently generated and echoed by php and have adobe acrobat reader fired up on the push of a button....
Multilanguage Website
I'm trying to make a multilanguage website. When the user enters the site, I want to detect the language and automatically make a redirection. How can I do this? And how should I organize my data base so the user can switch languages easily?
Getting Info From A Website.
I have been doing PHP for over a year now but when I came round to writing a script I discovered that there was a reasonably sizeable gap in my knowledge that I didn't even know where to start finding out about. Anyway this is a reasonably nooby question: If I have a script on http://url-a.com/script.php and I want to get some dynamic information of my friend's site at http://url-b.com/info.php , How can I get it? I need to use get variables in getting it and it must also be server side.
CW - My Latest Php Website
Its also the first shopping cart i've wrote . Personally i find it a bit strange that given all the php scripters on this newsgroup nobody ever posts a url to their work . I suspect thats sometimes [1] because a lot of people never really finish a website and they are more interested in php code snippets - not saying thats a bad thing of course - it just seems a bit pointless if you never really do anything with the gained knowledge . [1] and non disclosure in some cases . Anyway , As you will see from the website below i also have a interest in web design and these days try to blend the 2 together . Comments (good or bad) invited .
Website Too Slow
I'm re-programming my Website (www.coaster.ch) in PHP and I find it too slow (although I have ADSL). That's more or less how it functions: Here my tables: 'COASTERS' (code of coaster, code of country, etc...) 'COUNTRIES' (code of country, names of countries in different languages, code of continent) 'CONTINENTS' (code of continent, names of continents in different languages) In my index.php (start site) I use a "while": I look for the first continent. I look for the first country I count all the coasters from 1st country echo country - number of coasters I look for the second country I count all the coasters from 2nd country .... .... I look for last continent.... The search and presentation in tables (I use 5 tables, 1 for each continent) is rapid. The problem is when I go the the sub-site of a country and want to come back to the index site: it takes too much time. Could it be that it is slow because it has to make the whole search again? Can I solve that by making the first search (at the begin of the session with something like requireOnce "search data) and charge all the information in an array and them when returning from a sub site only showing the array? I also thought that perhaps the reason could be that I use tables for continents and countries but otherwise I should have to include all these texts in .inc files...
Php To Spider A Website
I am looking for a script that I can use to spider a website, and then pull the images... I know how to do it for a single page, but, I would like to be able to do this for the entire site.
Searching For Website
my case is i want the user to input a certain url. upon pressing send button i want to see if that url is valid / active/ existing or not. is this possible? how to do this?
Searchbox For My Website
I am thinking abouot creating a search box on my website in php. can someone give me any ideas or direction on how to do a search box for my website or is this something I can download and install?
|