if (isset($post["image"])) {
$img_str = fetch_url($post['image'],true, $redirects, 10);
- $tempfile = tempnam(get_config("system","temppath"), "cache");
+ $tempfile = tempnam(get_temppath(), "cache");
file_put_contents($tempfile, $img_str);
try {
$redirects = 0;
$img_str = fetch_url($_REQUEST['url'],true, $redirects, 10);
- $tempfile = tempnam(get_config("system","temppath"), "cache");
+ $tempfile = tempnam(get_temppath(), "cache");
file_put_contents($tempfile, $img_str);
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
unlink($tempfile);
}
// To-Do
- $tempfile = tempnam(get_config("system","temppath"), "mimecheck");
+ $tempfile = tempnam(get_temppath(), "mimecheck");
file_put_contents($tempfile, $data);
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
unlink($tempfile);
if ($image != "") {
$img_str = fetch_url($image);
- $tempfile = tempnam(get_config("system","temppath"), "cache");
+ $tempfile = tempnam(get_temppath(), "cache");
file_put_contents($tempfile, $img_str);
$postdata = array("status" => $msg, "media[]" => $tempfile);
} else
else {
$img_str = fetch_url($expanded_url, true, $redirects, 4);
- $tempfile = tempnam(get_config("system","temppath"), "cache");
+ $tempfile = tempnam(get_temppath(), "cache");
file_put_contents($tempfile, $img_str);
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
unlink($tempfile);
if(strlen($msg) and ($image != "")) {
$img_str = fetch_url($image);
- $tempfile = tempnam(get_config("system","temppath"), "cache");
+ $tempfile = tempnam(get_temppath(), "cache");
file_put_contents($tempfile, $img_str);
// Twitter had changed something so that the old library doesn't work anymore
else {
$img_str = fetch_url($expanded_url, true, $redirects, 4);
- $tempfile = tempnam(get_config("system","temppath"), "cache");
+ $tempfile = tempnam(get_temppath(), "cache");
file_put_contents($tempfile, $img_str);
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
unlink($tempfile);