/
var
/
www
/
vhosts
/
nabawater
/
vendor
/
fzaninotto
/
faker
/
src
/
Faker
/
Provider
/
/var/www/vhosts/nabawater/vendor/fzaninotto/faker/src/Faker/Provider
mkdir
upload
Name
Size
Mode
Actions
ar_JO/
-
0775
rm
ar_SA/
-
0775
rm
at_AT/
-
0775
rm
bg_BG/
-
0775
rm
bn_BD/
-
0775
rm
cs_CZ/
-
0775
rm
da_DK/
-
0775
rm
de_AT/
-
0775
rm
de_CH/
-
0775
rm
de_DE/
-
0775
rm
el_CY/
-
0775
rm
el_GR/
-
0775
rm
en_AU/
-
0775
rm
en_CA/
-
0775
rm
en_GB/
-
0775
rm
en_HK/
-
0775
rm
en_IN/
-
0775
rm
en_NG/
-
0775
rm
en_NZ/
-
0775
rm
en_PH/
-
0775
rm
en_SG/
-
0775
rm
en_UG/
-
0775
rm
en_US/
-
0775
rm
en_ZA/
-
0775
rm
es_AR/
-
0775
rm
es_ES/
-
0775
rm
es_PE/
-
0775
rm
es_VE/
-
0775
rm
fa_IR/
-
0775
rm
fi_FI/
-
0775
rm
fr_BE/
-
0775
rm
fr_CA/
-
0775
rm
fr_CH/
-
0775
rm
fr_FR/
-
0775
rm
he_IL/
-
0775
rm
hr_HR/
-
0775
rm
hu_HU/
-
0775
rm
hy_AM/
-
0775
rm
id_ID/
-
0775
rm
is_IS/
-
0775
rm
it_CH/
-
0775
rm
it_IT/
-
0775
rm
ja_JP/
-
0775
rm
ka_GE/
-
0775
rm
kk_KZ/
-
0775
rm
ko_KR/
-
0775
rm
lt_LT/
-
0775
rm
lv_LV/
-
0775
rm
me_ME/
-
0775
rm
mn_MN/
-
0775
rm
ms_MY/
-
0775
rm
nb_NO/
-
0775
rm
ne_NP/
-
0775
rm
nl_BE/
-
0775
rm
nl_NL/
-
0775
rm
pl_PL/
-
0775
rm
pt_BR/
-
0775
rm
pt_PT/
-
0775
rm
ro_MD/
-
0775
rm
ro_RO/
-
0775
rm
ru_RU/
-
0775
rm
sk_SK/
-
0775
rm
sl_SI/
-
0775
rm
sr_Cyrl_RS/
-
0775
rm
sr_Latn_RS/
-
0775
rm
sr_RS/
-
0775
rm
sv_SE/
-
0775
rm
th_TH/
-
0775
rm
tr_TR/
-
0775
rm
uk_UA/
-
0775
rm
vi_VN/
-
0775
rm
zh_CN/
-
0775
rm
zh_TW/
-
0775
rm
Address.php
3315
0664
edit
dl
rm
Barcode.php
2805
0664
edit
dl
rm
Base.php
20338
0664
edit
dl
rm
Biased.php
1827
0664
edit
dl
rm
Color.php
3935
0664
edit
dl
rm
Company.php
829
0664
edit
dl
rm
DateTime.php
11640
0664
edit
dl
rm
File.php
48862
0664
edit
dl
rm
HtmlLorem.php
9579
0664
edit
dl
rm
Image.php
3607
0664
edit
dl
rm
Internet.php
15712
0664
edit
dl
rm
Lorem.php
7808
0664
edit
dl
rm
Miscellaneous.php
13365
0664
edit
dl
rm
Payment.php
11703
0664
edit
dl
rm
Person.php
3141
0664
edit
dl
rm
PhoneNumber.php
1053
0664
edit
dl
rm
Text.php
4742
0664
edit
dl
rm
UserAgent.php
6118
0664
edit
dl
rm
Uuid.php
1687
0664
edit
dl
rm
Edit:
/var/www/vhosts/nabawater/vendor/fzaninotto/faker/src/Faker/Provider/Image.php
(3607B)
<?php namespace Faker\Provider; /** * Depends on image generation from http://lorempixel.com/ */ class Image extends Base { protected static $categories = array( 'abstract', 'animals', 'business', 'cats', 'city', 'food', 'nightlife', 'fashion', 'people', 'nature', 'sports', 'technics', 'transport' ); /** * Generate the URL that will return a random image * * Set randomize to false to remove the random GET parameter at the end of the url. * * @example 'http://lorempixel.com/640/480/?12345' * * @param integer $width * @param integer $height * @param string|null $category * @param bool $randomize * @param string|null $word * @param bool $gray * * @return string */ public static function imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false) { $baseUrl = "https://lorempixel.com/"; $url = "{$width}/{$height}/"; if ($gray) { $url = "gray/" . $url; } if ($category) { if (!in_array($category, static::$categories)) { throw new \InvalidArgumentException(sprintf('Unknown image category "%s"', $category)); } $url .= "{$category}/"; if ($word) { $url .= "{$word}/"; } } if ($randomize) { $url .= '?' . static::randomNumber(5, true); } return $baseUrl . $url; } /** * Download a remote random image to disk and return its location * * Requires curl, or allow_url_fopen to be on in php.ini. * * @example '/path/to/dir/13b73edae8443990be1aa8f1a483bc27.jpg' */ public static function image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null) { $dir = is_null($dir) ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible // Validate directory path if (!is_dir($dir) || !is_writable($dir)) { throw new \InvalidArgumentException(sprintf('Cannot write to directory "%s"', $dir)); } // Generate a random filename. Use the server address so that a file // generated at the same time on a different server won't have a collision. $name = md5(uniqid(empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR'], true)); $filename = $name .'.jpg'; $filepath = $dir . DIRECTORY_SEPARATOR . $filename; $url = static::imageUrl($width, $height, $category, $randomize, $word); // save file if (function_exists('curl_exec')) { // use cURL $fp = fopen($filepath, 'w'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); $success = curl_exec($ch) && curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200; fclose($fp); curl_close($ch); if (!$success) { unlink($filepath); // could not contact the distant URL or HTTP error - fail silently. return false; } } elseif (ini_get('allow_url_fopen')) { // use remote fopen() via copy() $success = copy($url, $filepath); } else { return new \RuntimeException('The image formatter downloads an image from a remote HTTP server. Therefore, it requires that PHP can request remote hosts, either via cURL or fopen()'); } return $fullPath ? $filepath : $filename; } }
Save