Jump to content


Photo

file_get_contents Issue............


  • Please log in to reply
2 replies to this topic

#1 Sydok

Sydok
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 24 May 2006 - 12:02 AM

Need help have a an issue using file_get_contents with an ftp account I have trying to create a script to access using FTP and then grabbing the contents of a file where it is choking is shown below:

$sFile2 =file_get_contents("ftp://username%40domainname.com:password@domainname.com/html/test_get.php");

Error Message received:
Warning:file_get_contents(ftp://...@****.****.com:*****@*****.******.com/mainwebsite_html/test_get.php): failed to open stream: Success in /home/*****/public_html/test_get.php on line 76

The Url if tested in a Browser works Fine.
Tested using a different FTP site works fine.
Need to be able to do this for this FTP site trying to setup a Site Monitor don't want to just test Ports

I believe it is actually choking at "username@domainname.com" the server that I am trying to access requires the username formatted in that way. Is there a way to solve this issue?????

Please Help!!!!!

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 24 May 2006 - 01:48 AM

Use the FTP functions that are builtin to PHP. See the [a href=\"http://www.php.net/ftp\" target=\"_blank\"]Real Fine Manual[/a].

Ken

#3 Sydok

Sydok
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 24 May 2006 - 04:24 PM

Thanks Ken I'll give that a try and see what happens




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users