use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Database\DBA;
$stamp1 = microtime(true);
file_put_contents($path, $string);
$stamp1 = microtime(true);
file_put_contents($path, $string);
*
* @param string $filename Image filename
* @param boolean $fromcurl Check Content-Type header from curl request
*
* @param string $filename Image filename
* @param boolean $fromcurl Check Content-Type header from curl request
*/
public static function guessType($filename, $fromcurl = false, $header = '')
{
Logger::log('Image: guessType: '.$filename . ($fromcurl?' from curl headers':''), Logger::DEBUG);
$type = null;
if ($fromcurl) {
*/
public static function guessType($filename, $fromcurl = false, $header = '')
{
Logger::log('Image: guessType: '.$filename . ($fromcurl?' from curl headers':''), Logger::DEBUG);
$type = null;
if ($fromcurl) {
$stamp1 = microtime(true);
file_put_contents($tempfile, $img_str);
$a->saveTimestamp($stamp1, "file");
$stamp1 = microtime(true);
file_put_contents($tempfile, $img_str);
$a->saveTimestamp($stamp1, "file");
* @param integer $uid user id
* @param string $imagedata optional, default empty
* @param string $url optional, default empty
* @return array
* @param integer $uid user id
* @param string $imagedata optional, default empty
* @param string $url optional, default empty
* @return array
*/
public static function storePhoto(App $a, $uid, $imagedata = "", $url = "")
{
*/
public static function storePhoto(App $a, $uid, $imagedata = "", $url = "")
{
if ((strlen($imagedata) == 0) && ($url == "")) {
Logger::log("No image data and no url provided", Logger::DEBUG);
if ((strlen($imagedata) == 0) && ($url == "")) {
Logger::log("No image data and no url provided", Logger::DEBUG);