NYCPHP Meetup

NYPHP.org

[nycphp-talk] ftp_connect(): php_network_getaddresses: gethostbyname failed

anthony wlodarski anthony at thrillist.com
Mon Jul 7 16:26:29 EDT 2008


Try this

<?php

$ftp_server = "ftp.domain.com";

// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to  
$ftp_server");

?>

On Jul 7, 2008, at 4:10 PM, Rahmin Pavlovic wrote:

> The following works fine in shell:
>
> ftp ftp.domain.com
>
> But my script spins out and returns:
>
> Warning: ftp_connect(): php_network_getaddresses: gethostbyname  
> failed in file
>
> Why is that?
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php





More information about the talk mailing list