Re: [PHP] scandir and ftp wrapper
Still can't get it to work, seems to be a problem generally with the ftp wrapper. If I try something really basic like echo file_get_contents('ftp://user:[EMAIL PROTECTED]/file.txt'); I get an empty string with no error messages. If I copy and paste the ftp url string into firefox it displays the file, so the url is correct If I try this echo file_get_contents('http://www.google.com'); I get the html displayed. I have been testing this code using the php cli if that makes any difference. Really could use some suggestions on this one Thanks J. On 4/2/07, j <[EMAIL PROTECTED]> wrote: Hi I have a question about scandir I have been trying to track down problems after upgrading from 5.1.6 to 5.2.1. I have been getting errors with a section of code that does something similar to the following $fileList=scandir("ftp://user:[EMAIL PROTECTED]/"); I get the following error. Warning: scandir(ftp://[EMAIL PROTECTED]/): failed to open dir: not implemented in /path/to/file.php on line 9 I checked phpinfo and ftp is included in the registered streams list. allow_url_fopen is set to on. Any suggestions why this code is not working? Thanks j. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: scandir and ftp wrapper
It appears you are trying to scan/list a remote site's directory; why? Most sites will not >>allow you to do this. I'm connecting to a remote site via the ftp wrapper. So I can't just use the file path. I have a script which runs on one webserver to get information off another server via ftp. This is the only way the files I need can be retrieved. J.
Re: [PHP] scandir and ftp wrapper
I can think of only one reason why your test might be invalid: If you have already logged in to the FTP server from the browser, and the user:pass in the URL aren't the ones actually authenticating you, but the ones saved in the browser are the ones that let you in, you'd get the behaviour you have described. Seeems unlikely to be the cause, but quit the browser before your test to be sure. The ftp login details are definitely correct. I found another linux machine I have access to on which running the identical line of code on worked. That was a fc5 machine with the rpm'd version of apache and php. The problem showed up after I did the upgrade to 5.2.1 so the wrapper stuff worked before but now its just silently failing. I compile php from source so I wonder if its some compilation/configuration issue ? I did consider if it was a firewall/network issue as the other machine is on a completely different network but I can passively ftp to the ftp server using the linux command line ftp program You may also want to consider using http://php.net/ftp as a work-around, if this new-fangled FPT streams stuff just isn't working. Or even http://php.net/curl for that matter. I would like to avoid having to re-write the code using curl if possible. Cheers J.
Re: [PHP] PHP & Text Messaging
I don't know of any free providers for what you want to do, but i've used http://www.clickatell.com/ to send text message notification from servers before. You can trigger the sending of the message by various methods including email and http request. Hope this helps J. On 4/19/07, Daniel Brown <[EMAIL PROTECTED]> wrote: I actually believe that vText is strictly for Verizon Wireless users, but I tried sending web messages to friends without it and, according to the system, the messages went through. So I guess you could give it a shot. On 4/19/07, Brian Seymour <[EMAIL PROTECTED]> wrote: > > I know vtext.com sends email to phones. Perhaps using the mail function > you > could just send a message to [EMAIL PROTECTED] and they would get the > message. To my knowledge this is a free service and works with all phone > providers since they do the message for you. Just a thought. > > Hope this helps, > Brian > > -Original Message- > From: Philip Thompson [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 19, 2007 10:28 AM > To: php General List > Subject: [PHP] PHP & Text Messaging > > Hi. I have attempted to look at the archives for this, but keep > getting redirected back to the main PHP site when I click on the > archive link. With that said, does anyone know of any good resources > for sending text messages using PHP? I have Googled this topic and > found a few, but find it hard to judge which ones are "good." I have > also looked at the SAM package, but wasn't sure how much that is > being used by the community. > > Thanks in advance, > ~Philip > > -- > 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 > > -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107