1. Go to this page and download the library: Download sparkapi/feed-faker library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sparkapi / feed-faker example snippets
$settings = [
// ' => 'your_unsplash_app_id', // unsplash specific
'interior_collection' => collection_id, // unsplash collection or filesystem path if using local photo provider
'exterior_collection' => collection_id, // unsplash collection or filesystem path if using local photo provider
'portrait_collection' => collection_id, // unsplash collection or filesystem path if using local photo provider
// Optional photo provider, if not using unsplash (you can ignore the above, too).
'photo_provider' => \FeedFaker\Helper\UnsplashPhotoProvider::class,
// Basic settings, all with defaults.
'mls_id' => 'my-awesome-mls',
// the number of objects you want to create for each resource type.
'office_count' => 50,
'member_count' => 150,
'property_count' => 500,
'openhouse_count' => 1000,
'history_count' => 1000,
'media_count' => 5000,
];
$logger_setup = function($monolog) {
// Save all debug and above messages to a file
$monolog->pushHandler(new StreamHandler('/path/to/logs.log', \Monolog\Logger::DEBUG));
// Save more important messages to some other place
$monolog->pushHandler(new SomeOtherHandler(\Monolog\Logger::WARNING));
};
$feedfake = new FeedFaker\FakeFeed([], $logger_setup);
$data = $feedfake->go()
$feedfake = new FeedFaker\FakeFeed([], $my_psr_3_logger);
$data = $feedfake->go()
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.