Featured Post

internet explorer cannot download 704 from site


This problem will mostly occur when you will test your script in old version(s) of IE. This article is continuity of previous article Download file problem due to version incompatibility of IE & Adobe Reader. In fact when i posted the previous problem with corrections so that was working fine with file downloading but story doesn’t end here. Our requirement was not only to download files but their format should be correct as well. Have you noticed that Content-Transfer-Encoding is binary in our script. There are other options as well. But i want discuss a little about change of binary code. Although, download script can be written in different scripting languages but if you are writing it in PHP so you can have this problem as well. Problem is about the PHP error occurred, either syntax error or any logical error. Once PHP occurred so your binary will be appended by that error notification. I experienced it when i checked that why files are not opening although downloaded correctly and in complete size. I would suggest you to check you files which you are downloading but couldn’t open them correctly. Right click on that file and open with notepad, you will see some PHP errors in that file appended as prefix or postfix depends upon occurrence. Anyways, lets talk about another header parameter is Content-Type which i suggested in my last post to be the same which we get from mime_content_type but when i reviewed my code so couldn’t get problem from this portion. Because octet/stream is fine for this purpose. What i found which lead my script towards working condition is ob_clean() and flush() functions. Here my findings matched which i already discussed above about appending content of the file, by these two functions we will clean whatever will be written before the binary of the file. Here is the refined script which is working in IE8 and old version(s) IE7.

header(‘Content-Type: application/octet-stream’);
header(‘Content-Disposition: attachment; filename=’.file_parts($filename,’name’));
header(‘Content-Transfer-Encoding: binary’);
header(‘Expires: 0′);
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0′);
header(‘Pragma: public’);
header(‘Content-Length: ‘ . filesize($filename));
ob_clean();
flush();
readfile($filename);
exit;

Please click on file_parts to view the helper function which i coded just to speed up the work. Although the resembling function is already available in PHP but with a little different flavors.

FB App – Codeigniter

  1. You have to put FB App ID & Secrete key in config.php
  2. Then check the response in facebook controller (index function)

Click here to download

Notes: If you want to update facebook latest api so check the libraries directory. And your domain should have https , i hope this post will help a little.

Tags:

<form action=”{paypal_url}” method=”post” id=”checkout” name=”checkout”> <!–<input type=”hidden” value=”_xclick” name=”cmd”>–> <input type=”hidden” name=”cmd” value=”_cart”> <input type=”hidden” name=”upload” value=”1″> <input type=”hidden” value=”2″ name=”rm”> <input type=”hidden” value=”{business}” name=”business”> <span id=”products_sale”> </span> <input type=”hidden” name=”tax_cart” id=”tax_cart” value=”0″> <input type=”hidden” name=”email” value=”{logged_email}” /> <input type=”hidden” name=”first_name” value=”{first_name}” /> <input type=”hidden” name=”last_name” value=”{last_name}” /> <input type=”hidden” value=”{currency}” name=”currency_code”> <input type=”hidden” value=”IC_Sample” [...]

Tags:

$(‘.floating’).keydown(function(event) { if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || // Allow: Ctrl+A (event.keyCode == 65 && event.ctrlKey === true) || // Allow: home, end, left, right (event.keyCode >= 35 && event.keyCode <= 39) || //Both dots (event.keyCode == 110 || event.keyCode == 190) ) [...]

Tags:

Duplicate input fields in DOM giving error on jquery lightbox or calendar implementation Problem: Sometimes we need to replicate the input fields on runtime with core js or jquery functions like .html, .append() or .prepend(). You will notice that most of the jquery examples are available with DOM ready functions or document ready. Most of [...]

Tags:

Download file problem due to version incompatibility of IE & Adobe Reader I have reviewed & updated the code. In fact when we throw the file content in page, it has two options a) Will open PDF in the browser b) Will start download immediately Before correction in PHP script, you need to check the [...]

Tags:

PHP SMTP Email, Mail.php, Rackspace Cloud Hosting, Pear Mail, Authenticated Email Function //I AM USING HTTP POT VARS BECAUSE WE ARE GETTING VARIABLES FROM HTML FILE, IF WE USE PHP FILE THEN WE CAN USE $_POST & $_GET $random_hash = md5(date(‘r’, time())); $what_to_replace = array(‘contact_’,’_’); $replace_with = ‘ ‘;//WE WANA REPLACE UNDERSCORES WITH SPACES $http_vars [...]

Tags:

Entrepreneurship? I my view its vision not the concern of starting a business. Its an effort to combine excellent talent start a voyage towards success. Entrepreneurship is not an inspiration or reaction to demand and supply graph but to come up with a different vision to serve in better way. May be my views looks [...]

Tags:

Utilities Available for ext4 file system e2fsck Used to repair an ext4 file system. This tool checks and repairs an ext4 file system more efficiently than ext3, thanks to updates in the ext4 disk structure. e2label Changes the label on an ext4 file system. This tool also works on ext2 and ext3 file systems. quota [...]

Tags:

The new features included in ext4 file system, which were not present in its previous versions Extended storage limits and other performance improvements Can support volumes with sizes up to 1 exbibyte (EiB) and files with sizes up to 16 tebibytes (TiB) Traditional block mapping scheme replaced by extents used by ext2/3 filesystems. It is [...]

Tags: