last day (14 days later) » 

@Sisir need to talk about the Email Downloads plugin, we made earlier
sure
Current scenario is: we made admin email default
But admin email may not be on-domain email like ([email protected])
So the wp_mail() function won't work
you can do someting like [email protected] as sender
as I think admin emails shouldn't be exposed..
Can we go for something like noreply@<?php echo $_SERVER['SERVER_NAME']; ?>
08:53
yes, or just grab the domain from the home_url()
please note: our plugin can be installed in sub.example.com or example.com or example.com/sub, and it should always work for all the instances.
I have a code to grab domain from url.. let me make a gist
@Sisir sure. please.
And there's an issue regarding proper HTTP headers.
What I did now, is working on live servers.
in Linux of course
but not working in my Windows WAMP localserver
function noreply_email(){
	$info = parse_url(home_url());
	$host = $info['host'];
	$domain = preg_replace('/^www./','',$host);
	return 'noreply@'.$domain;
}
check if this works..
@Sisir Thanks. I'll inform you using this inshALLAH.
The issue is, always the file is downloading, but with 0 bytes. The present code works and its downloading files only in remote server
09:00
meaning something to do with http://localhost/ like urls?
না, HTTP হেডারগুলো দেখেন: github.com/nanodesigns/email-downloads/blob/master/…
বহু ঘাটাঘাটি করে এই অবস্থায় আনা গেছে, যাতে আমার লিনাক্স হোস্টে চেক করে দেখেছি কাজ করে।
কিন্তু লোকাল উইন্ডোজ পিসিতে ওয়াম্প সার্ভারে কাজ করছে না।
কাজ করছে না, মানে, হলো ফাইল ঠিকই ডাউনলোড হয়, কিন্তু হয় 0 byte নিয়ে।
রিমোট লিনাক্স সার্ভারে (dev.nanodesignsbd.com)-এ চেক করে দেখেছি, কাজ করছে, ফাইল ডাউনলোড হচ্ছে, যথাযথভাবেই।
what is your localhost url?
problem onno kothao
http header gulo totally baad dile ki hoi?
HTTP header ছাড়া তো ডাউনলোড ফোর্স করা যায় না আমি যা জেনেছি।
09:08
specially the file size param
ফাইলসাইজ তো পিএইচপি ফাংক, কাজ না করার কথা না।
check kore dekhen to filesize er value ta thik hoi kina.. mane jokhon file size 0 byte dekhai tokhon.
Log the result of the function..
@Sisir কোনো উপায়? আমি এভাবে করিনি কখনো :(
হার্ডকোডে ধরে ধরে চেক করতে পারি, echo filesize(basename( $file_path ));
there is a constant WP_DEBUG_LOG when true wp will log errors on wp_content directory log text file..
you can create a log function to write anthing on that log file using php
if(!function_exists('log_it')){ // requires define( 'WP_DEBUG_LOG', true ); and Debug mode on
 function log_it( $message ) {
   if( WP_DEBUG === true ){
     if( is_array( $message ) || is_object( $message ) ){
       error_log( print_r( $message, true ) );
     } else {
       error_log( $message );
     }
   }
 }
}
Thanks a lot
I'll notify you then, both the issues.
Thanks a lot for the cooperation
@Sisir over and out for now. <3
09:24
cheers!

  last day (14 days later) »