Php get remote file problm

Status
Not open for further replies.

scottdat

New Member
Messages
1
Reaction score
0
Points
1
The following php works in my
Apache server but not
In x10host...any thoughts?
<?php
$content=file_get_contents(
"http://www.weathercity.com/us/
va/charlottesville/");
file_put_contents(x9.html,
$content);
?>
Thanks
Scott
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
but not In x10host...any thoughts?
-
this code works (made the file [ x9.html ] ) for me - on x10hosting's free-hosting server [ xo3 ]

PHP:
<?php
error_reporting(E_ALL);

/*
$content=file_get_contents(
"http://www.weathercity.com/us/
va/charlottesville/");
file_put_contents(x9.html,
$content);
*/

$content=file_get_contents("http://www.weathercity.com/us/va/charlottesville/");

file_put_contents('x9.html', $content);

print $content . "<br>\n";
?>

###
 
Status
Not open for further replies.
Top