[PHP] Is this possible with php
Hi, I really don't think this is possible from what I know of php, but I thought I would as the experts. Is it possible to have php create directories and move files on a local machine. I have created a web portal for a client and now they would like it to upload files to an server, no a problem. But they would like it to also move temp files on the users computer to new directories and then upload the file to the server with no user interation other than clicking go. I have thought of doing this in vb or c# but I have done very little with these languages, and php just rocks. Thanks Scandog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this possible in PHP?
I want a script that can display a list of all the websites currently hosted on my server.. (i have root access to the server) Say I have a page sitesonmyserver.php..it shud show a list of all the websites hosted on my server..eg: abc.com xyz.om And any additional info if possible? I'd make a script that went through the httpd.conf file with DOM and pulled out all the virtual hosts. Either that or looked at the home directory listings for each site. If this is what you were getting at (seeing as you mentioned root access and what-not), then read the next paragraph. If not, you can skip the next paragraph. This is quite a dangerous thing to do. Giving PHP root access to your server is like giving a homeless guy your credit card. Anyone can access the resources that PHP uses if they try hard enough. You might as well just hand every hacker on the web a little Post-It note with your root password on it. Is such a thing possible in PHP.. or does any such script exists? Definitely. If you take the right approach! I'd use a database. You could certainly find a class or script that could accomplish the database lookup that would get what you wanted. I'd start by reading the manual sections on mySQL database queries. http://us4.php.net/mysql Hope this helps! -- The Disguised Jedi [EMAIL PROTECTED] Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm world-wide BABY! PHP rocks! Knowledge is Power. Power Corrupts. Go to school, become evil Disclaimer: Any disclaimer attached to this message may be ignored. However, I must say that the ENTIRE contents of this message are subject to other's criticism, corrections, and speculations. This message is Certified Virus Free -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this possible in PHP?
[EMAIL PROTECTED] wrote: I'd make a script that went through the httpd.conf file with DOM and pulled out all the virtual hosts. Either that or looked at the home directory listings for each site. If this is what you were getting at (seeing as you mentioned root access and what-not), then read the next paragraph. If not, you can skip the next paragraph. This is quite a dangerous thing to do. Giving PHP root access to your server is like giving a homeless guy your credit card. Anyone can access the resources that PHP uses if they try hard enough. You might as well just hand every hacker on the web a little Post-It note with your root password on it. Indeed it is. Why don't you have the httpd.conf then the virtual domains in another file (which is included into the httpd.conf). You can then use a cron to copy this (the vir doms) to another file (say the dir above webroot) and chown it to www:www for use with apache. PHP can then read this parse the ServerNames without having it read the root dirs or giving it special access rights. Cheers Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is this possible in PHP?
Hi! I want a script that can display a list of all the websites currently hosted on my server.. (i have root access to the server) Say I have a page sitesonmyserver.php..it shud show a list of all the websites hosted on my server..eg: abc.com xyz.om And any additional info if possible? Is such a thing possible in PHP.. or does any such script exists? Thanks in advance! Dasmeet SayOrange.com How to choose the best web hosting? http://www.sayorange.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is this possible in PHP?
-Original Message- From: Dasmeet Singh [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 03, 2005 9:03 AM I want a script that can display a list of all the websites currently hosted on my server.. (i have root access to the server) Say I have a page sitesonmyserver.php..it shud show a list of all the websites hosted on my server..eg: abc.com xyz.om And any additional info if possible? Is such a thing possible in PHP.. or does any such script exists? If You´re running Apache, parse the httpd.conf and echo the line containing ServerName? -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/Systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this possible in PHP?
Dasmeet Singh wrote: Hi! I want a script that can display a list of all the websites currently hosted on my server.. (i have root access to the server) Say I have a page sitesonmyserver.php..it shud show a list of all the websites hosted on my server..eg: abc.com xyz.om And any additional info if possible? Is such a thing possible in PHP.. or does any such script exists? Generally, no. You would need some black magic that probed the guts of your web server for this information. And by black magic I mean some low-level C code. A bit of grey magic I wrote almost exactly 9 years ago now! (May 1, 1996) in the form of Apache's mod_info module might help you out a little bit. If you define all your vhosts in your httpd.conf file and not in included files, then you can enable mod_info in your Apache config, and restrict access to the information to localhost with something like: Location /server-info SetHandler server-info Order deny,allow Deny from all Allow from 127.0.0.1 /Location Then your PHP code would hit your server's local /server-info link and parse it with something along the lines of: $info = file_get_contents('http://localhost/server-info?http_core.c'); preg_match_all('/.*servername .*?(\S+?).*/i',$info,$reg); $vhosts = $reg[1]; You may need to doublecheck that regex. I didn't actually test it. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is it possible using php ?
A server and client are connected using a 35kbps PPP link. A user on the client side types the URL of a mpeg file on the location bar. The same file is also existing in $DIR of the client (windows) system. Now, since the file is already there on the local hard disk of the client, the file need not be downloaded through the PPP link, instead be played from the local disk - which makes faster access ! It is something like this: if file available locally, then use that file else send the file present in the location as given by the URL Is there a way to do this from the server side using php. Or using any other tool, can we do it on the client side - that is, say, some program always runs in the background and whenever a URL is entered, the $DIR is checked to see if the file is present else it is retrieved from the location. All this should be transparent to the user. Can anyone help me please ? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible using php ?
T UmaShankari wrote: A user on the client side types the URL of a mpeg file on the location bar. The same file is also existing in $DIR of the client (windows) system. Now, since the file is already there on the local hard disk of the client, the file need not be downloaded through the PPP link, instead be played from the local disk - which makes faster access ! Since your webserver does not know what files exist in the client's hard disk this is impossible for a php script to do. What you are looking for is probably some kind of plug in for your browser. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is this possible with php?
You should probably mention that this is called WebFolders in M$-speak and it actually works quite well when combined with the mod_dav and mod_digest Apache modules. -Rasmus On Fri, 10 Jan 2003, Timothy Hitchens (HiTCHO) wrote: So you want to be able to have a directory that when saved to it is really the server well besides ftp or samba integration into explorer the only other option you have is to use webdav with apache and that way it would be a post of sorts to the mod webdav module in apache. Timothy Hitchens (HiTCHO) Open Platform Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 January 2003 4:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Is this possible with php? I would like to know if the follwing function can be implemneted in php with help of other tools: using MS Word in windows, when a file is saved, can it be AUTOMATICALLY uploaded (via http POST or other mechanism) to a server? Currently I need to first save it on my desktop, then upload that copy to a php-supported server. Thanks in advance. Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this possible with php?
[EMAIL PROTECTED] wrote: using MS Word in windows, when a file is saved, can it be AUTOMATICALLY uploaded (via http POST or other mechanism) to a server? Yes, in a webDAV enabled directory on your webserver (http://www.webdav.org). Its a module that you can compile for use with Apache (I'm using it under linux). M$ are one of the authors of the standard (RFC2518). Currently I need to first save it on my desktop, then upload that copy to a php-supported server. Yes, that is the problem statement. In a webDAV enabled directory, its like an ordinary directory from your webserver but read/write, with file locking. Any authorisation your webserver supports may be used. Nothing to do with PHP though. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this possible with php?
[EMAIL PROTECTED] wrote... : I would like to know if the follwing function can be implemneted in php with help of other tools: in PHP distribution? PHP is the programming language, not a client/server tool. This is definitely something to be an integrated part of something else. using MS Word in windows, MS Word for editing PHP files? That is very, very bad ... You will never find a job if ever mention it to an employer. Search the archives of this list for PHP Editors. I recommend Edit Plus for plain-text programming. If you want a whole IDE then Zend Studio is probably the best for you. when a file is saved, can it be AUTOMATICALLY uploaded (via http POST or other mechanism) to a server? Currently I need to first save it on my desktop, then upload that copy to a php-supported server. Oh well, there are four ways to accomplish this. 1. Professional way: Using CVS. CVS (cvshome.org) is a system that allows you to version your files. This, in two words, works this way: in CVS, you `checkout' (update) a file, edit it, and save it (if somebody else edited that file while you edited yours both changes will merge). CVS is the most professional solution for this thing. 2. Simplest way: Use a mapped networking like Samba. This will mean that you will see your server just as it was a hard disk on your windows. You dragdrop files there and the same will occur remotely. Not a very secure way, though. 3. FTP integrated tool: Get a good editor that has some FTP integration. It will means that when you `save' a file in your editor, it will automatically FTP that file on the server. A very tool-dependent way but can work. Very cruel when something goes wrong, though. Again, Zend IDE and Edit Plus can do that. 4. The Geeky way: Edit all your files in a simple VIM or other fancy directly on the server by logging there with telnet or SSH. Have fun. -- Maxim Maletsky [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this possible with php?
on 10/01/03 6:14 PM, Tom Rogers ([EMAIL PROTECTED]) wrote: I use webdrive which allows me to map an ftp site to a windows drive letter so it gets treated as a local drive . very usefull. You can read about it here http://www.webdrive.com/ Does anyone know of a mac (OS8/9 NOT OSX) application that does a simular thing? Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this possible with php?
Hi, Where did he say he wanted to use Word to edit PHP files? AFAICT the idea was to automatically upload Word files, presumably to make them available on an Intranet for download etc. As for uploading a file automatically - PHP isn't going to do it. An app which can map a virtual drive in Windows would probably be the best bet - I think Windows has built in support for mapping WebDAV and FTP servers as shares so this may be a good starting point. HTH Danny. - Original Message - From: Maxim Maletsky [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 10, 2003 11:38 AM Subject: Re: [PHP] Is this possible with php? [EMAIL PROTECTED] wrote... : I would like to know if the follwing function can be implemneted in php with help of other tools: in PHP distribution? PHP is the programming language, not a client/server tool. This is definitely something to be an integrated part of something else. using MS Word in windows, MS Word for editing PHP files? That is very, very bad ... You will never find a job if ever mention it to an employer. Search the archives of this list for PHP Editors. I recommend Edit Plus for plain-text programming. If you want a whole IDE then Zend Studio is probably the best for you. when a file is saved, can it be AUTOMATICALLY uploaded (via http POST or other mechanism) to a server? Currently I need to first save it on my desktop, then upload that copy to a php-supported server. Oh well, there are four ways to accomplish this. 1. Professional way: Using CVS. CVS (cvshome.org) is a system that allows you to version your files. This, in two words, works this way: in CVS, you `checkout' (update) a file, edit it, and save it (if somebody else edited that file while you edited yours both changes will merge). CVS is the most professional solution for this thing. 2. Simplest way: Use a mapped networking like Samba. This will mean that you will see your server just as it was a hard disk on your windows. You dragdrop files there and the same will occur remotely. Not a very secure way, though. 3. FTP integrated tool: Get a good editor that has some FTP integration. It will means that when you `save' a file in your editor, it will automatically FTP that file on the server. A very tool-dependent way but can work. Very cruel when something goes wrong, though. Again, Zend IDE and Edit Plus can do that. 4. The Geeky way: Edit all your files in a simple VIM or other fancy directly on the server by logging there with telnet or SSH. Have fun. -- Maxim Maletsky [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this possible with php?
On Fri, Jan 10, 2003 at 12:00:33PM -, Danny Shepherd wrote: Hi, Where did he say he wanted to use Word to edit PHP files? AFAICT the idea was to automatically upload Word files, presumably to make them available on an Intranet for download etc. Yes, automatically upload word file after the save button is pressed. As for uploading a file automatically - PHP isn't going to do it. An app which can map a virtual drive in Windows would probably be the best bet - I think Windows has built in support for mapping WebDAV and FTP servers as shares so this may be a good starting point. I have looked at webdav, ftp, etc. None can solve my client's problem without a major overhaul of the system. The problem is: My client has a document management system (implemented in php) on a server. It does uploads without problem. However, each time, a file get modified, it has to be saved on local disk first and uploaded to the server by a few more clicks. It would be nice if the application (e.g.,ms words) can save the modified file directly to the server. I am wondering if office suite applications can be tweaked (using macros, vb?), so that a 'save' event will trigger an action of automatic upload. Or there is a better approach. Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is this possible with php?
I would like to know if the follwing function can be implemneted in php with help of other tools: using MS Word in windows, when a file is saved, can it be AUTOMATICALLY uploaded (via http POST or other mechanism) to a server? Currently I need to first save it on my desktop, then upload that copy to a php-supported server. Thanks in advance. Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is this possible with php?
So you want to be able to have a directory that when saved to it is really the server well besides ftp or samba integration into explorer the only other option you have is to use webdav with apache and that way it would be a post of sorts to the mod webdav module in apache. Timothy Hitchens (HiTCHO) Open Platform Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 January 2003 4:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Is this possible with php? I would like to know if the follwing function can be implemneted in php with help of other tools: using MS Word in windows, when a file is saved, can it be AUTOMATICALLY uploaded (via http POST or other mechanism) to a server? Currently I need to first save it on my desktop, then upload that copy to a php-supported server. Thanks in advance. Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this possible with php?
Hi, Friday, January 10, 2003, 4:06:23 PM, you wrote: tnc I would like to know if the follwing function can be implemneted tnc in php with help of other tools: tnc using MS Word in windows, when a file is saved, can it be AUTOMATICALLY tnc uploaded (via http POST or other mechanism) to a server? tnc Currently I need to first save it on my desktop, then upload that copy tnc to a php-supported server. tnc Thanks in advance. tnc Tim I use webdrive which allows me to map an ftp site to a windows drive letter so it gets treated as a local drive . very usefull. You can read about it here http://www.webdrive.com/ -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is This Possible? (Database - PHP)
Hey there guys, I have a slight problem which i could not solve via Java servlets and now that I am migrating to PHP I was wondering if its possible... I am hosting with a company that has given me a database (MySql) I am using the database for all my apps which are only being accessed via my servlets... I want to change that and convert all my servlets to PHP. Being new to PHP i am sure to make a lot of mistakes and instead of uploading my PHP page, getting errors/ redoing it, uploading etc I was kinda hoping i could connect to the remote database via my local machine? I already have PHP installed on my machine. on the remote host the details are Localhost jimmy*** (Username) gunsand* (Password) umace_com (Database name) Is this possible? Any help and comments appreciated. Cheers, -Ryan /* Whats the difference between the pope and your boss? The pope only wants you to kiss his ring! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is This Possible? (Database - PHP)
On Monday 13 May 2002 15:05, r wrote: Hey there guys, I have a slight problem which i could not solve via Java servlets and now that I am migrating to PHP I was wondering if its possible... I am hosting with a company that has given me a database (MySql) I am using the database for all my apps which are only being accessed via my servlets... I want to change that and convert all my servlets to PHP. Being new to PHP i am sure to make a lot of mistakes and instead of uploading my PHP page, getting errors/ redoing it, uploading etc I was kinda hoping i could connect to the remote database via my local machine? I already have PHP installed on my machine. on the remote host the details are Localhost jimmy*** (Username) gunsand* (Password) umace_com (Database name) Is this possible? It depends on whether your hosting company allows remote connections to the mysql server. Speak to them. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* You can tell how far we have to go, when FORTRAN is the language of supercomputers. -- Steven Feiner */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is This Possible? (Database - PHP)
Yes, it's certainly possible. You will have to talk your host into giving you remote access though, which could be hard. How permissions work in MySQL is that your username is given permission to connect from a specific host. Generally, the host is listed as 'localhost' meaning the script has to be on the same server as MySQL. You can also have '%' as your host, meaning you can connect from anywhere. Or, when your ISP assigns you an IP, the first 2 or 3 octets are generally the same. So you could put something like '123.123.%' or '123.123.123.%' in your host. You hosting provider, if they're any good, will know all about this. It's hard to talk people into giving you access, though, because they are generally pretty paranoid. ---John Holmes... -Original Message- From: r [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 12:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Is This Possible? (Database - PHP) Hey there guys, I have a slight problem which i could not solve via Java servlets and now that I am migrating to PHP I was wondering if its possible... I am hosting with a company that has given me a database (MySql) I am using the database for all my apps which are only being accessed via my servlets... I want to change that and convert all my servlets to PHP. Being new to PHP i am sure to make a lot of mistakes and instead of uploading my PHP page, getting errors/ redoing it, uploading etc I was kinda hoping i could connect to the remote database via my local machine? I already have PHP installed on my machine. on the remote host the details are Localhost jimmy*** (Username) gunsand* (Password) umace_com (Database name) Is this possible? Any help and comments appreciated. Cheers, -Ryan /* Whats the difference between the pope and your boss? The pope only wants you to kiss his ring! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php