This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
This Scheduler will run once every minute unlike the Heroku scheduler which only runs every 10 mintues. | |
To use this scheduler with Laravel 5.4+ add this file to /app/Console/Commands/RunScheduler.php | |
Register this file in app/Console/Kernel.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function uploadMedia($file) | |
{ | |
$target_url = "https://telegra.ph/upload"; | |
$file_name_with_full_path = $file; | |
if (function_exists('curl_file_create')) { // php 5.5+ | |
$cFile = curl_file_create($file_name_with_full_path); | |
} else { // | |
$cFile = '@' . realpath($file_name_with_full_path); |
OlderNewer