Does anyone have experience with this over-featured piece of garbage? The Smug Goat home barn (http://www.smuggoat.net) has to use cURL to work with any sort of image/file loading because the host has disabled regular file stream access (dreamhost.com is the host), and I have to type another 50 lines of code per standard PHP file_get_contents function.
It's a pain in the ass and it's definitely getting in the way of setting up the damn image gallery.
WTF draemhost.
u phail.
So yeh, help would be appreciated.
cURL
Moderator: Moderators
so fopen doesent work at all, or only on remote urls?
ive always used curl with fopen, like this
curl
fopen
you could also try
if they have crappeh admins who didnt change the httpd.conf to dissalow changes to it
.
ive always used curl with fopen, like this
curl
Code: Select all
<?php
$handle = curl_init("http://www.example.com/");
$file = fopen("index.html", "w");
curl_setopt($handle, CURLOPT_FILE, $file);
curl_setopt($handle, CURLOPT_HEADER, 0);
curl_exec($handle);
curl_close($handle);
fclose($file);
?>
fopen
Code: Select all
<?php
$handle = fopen("http://www.example.com/index.html", "rb");
$contents = '';
while (!feof($handle))
{
$contents .= fread($handle, 8192);
}
fclose($handle);
?>
Code: Select all
<?php
INI_SET("allow_url_fopen", 1);
?>
