i install auto index script. all thing work fine with my site. but i face downloading problem with mobile browser. i can download file to pc browser, but can't to mobile browser like opera mini,uc browser and other default mobile browser. anybody here for fix this problem? i will pay u if u are from bangladesh. or help me if u are acctuly know about this problem. here is my site link. sorry for my bad english.
problem with nikmob auto index.
Collapse
X
-
G'day,
I think the problem is force download isn't have app like jar-x/application.
You will need to edit the download . php so that browser will understand that it's not a site.Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
-
Here's an array of extensions and mime types i made a few years ago that should help:
You can also use mime type: 'application/force-download' for unknown extensions - (note: dont use this for forcing all downloads as some N-series and other phones dont like it)PHP Code:$type = array (
// archives
'zip' => 'application/zip',
'tar' => 'application/x-tar',
'tgz' => 'application/x-compressed-tar',
'tar.gz' => 'application/x-compressed-tar',
'rar' => 'application/x-rar-compressed',
// documents
'pdf' => 'application/pdf',
'doc' => 'application/msword',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
// executables
'exe' => 'application/octet-stream',
// images
'gif' => 'image/gif',
'png' => 'image/png',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
// audio
'mp3' => 'audio/mpeg',
'wav' => 'audio/x-wav',
// video
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'mp4' => 'video/mp4',
'mov' => 'video/quicktime',
'avi' => 'video/x-msvideo',
'wmv' => 'video/x-ms-wmv',
'mov' => 'video/quicktime',
// mobile
'sis' => 'application/vnd.sybian.install',
'jar' => 'application/java-archive',
'3gp' => 'application/octet-stream',
'nth' => 'application/vnd.nok-s40theme',
'thm' => 'application/vnd.eri.thm',
'amr' => 'audio/amr',
'sisx' => 'application/octet-stream',
'mid' => 'audio/midi',
'swf' => 'application/x-shockwave-flash',
'jad' => 'text/ vnd.sun.j2me.app-descriptor'
);
Last edited by something else; 08.11.13, 21:25.
Comment
-
where i add this code brother?Originally posted by something else View PostHere's an array of extensions and mime types i made a few years ago that should help:
You can also use mime type: 'application/force-download' for unknown extensionsPHP Code:$type = array (
// archives
'zip' => 'application/zip',
'tar' => 'application/x-tar',
'tgz' => 'application/x-compressed-tar',
'tar.gz' => 'application/x-compressed-tar',
'rar' => 'application/x-rar-compressed',
// documents
'pdf' => 'application/pdf',
'doc' => 'application/msword',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
// executables
'exe' => 'application/octet-stream',
// images
'gif' => 'image/gif',
'png' => 'image/png',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
// audio
'mp3' => 'audio/mpeg',
'wav' => 'audio/x-wav',
// video
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'mp4' => 'video/mp4',
'mov' => 'video/quicktime',
'avi' => 'video/x-msvideo',
'wmv' => 'video/x-ms-wmv',
'mov' => 'video/quicktime',
// mobile
'sis' => 'application/vnd.sybian.install',
'jar' => 'application/java-archive',
'3gp' => 'application/octet-stream',
'nth' => 'application/vnd.nok-s40theme',
'thm' => 'application/vnd.eri.thm',
'amr' => 'audio/amr',
'sisx' => 'application/octet-stream',
'mid' => 'audio/midi',
'swf' => 'application/x-shockwave-flash',
'jad' => 'text/ vnd.sun.j2me.app-descriptor'
);
Added after 2 minutes:
Please give me mime code of mp3 and jar file.Last edited by armanshuva5; 08.11.13, 03:48.
Comment
-
This is just an array you will need to add your own code to get the extension name and then match it against the array to get the correct mime type which then needs to be added to the force download script - i havent seen nikmob script so i have no ideaOriginally posted by armanshuva5 View Postwhere i add this code brother?
They are in the array of mime types aboveOriginally posted by armanshuva5 View PostPlease give me mime code of mp3 and jar file.
Comment
-
Solution for this was posted in a different topic so i thought i would add it to here to make it easier to find for other people with the same problem:
PHP Code:function download()
{
$result = $this->controllerObj->dbObj->getDInfo( $this->id );
if ( ! empty( $result ))
{
if ( is_file( $result->path ) )
{
$typeArray = array ( 'jpg' , 'gif' , 'jpeg' , 'png' );
$name = str_replace( ".$result->type" , " (YourSite.Com).$result->type" , $result->name );
$this->controllerObj->dbObj->updateDtime( $this->id );
$type = strtolower( $result->type );
if ( in_array( $type , $typeArray ))
{
$size = ( isset($_GET['size'] ) )? (int)$_GET['size'] : 1;
if ( $what = $this->controllerObj->resizeImage( $type , $result->path , $size ) == 1 )
{
$size = filesize( './apanel/tmp/raw.jpg' );
$path = './apanel/tmp/raw.jpg';
}
else
{
$path = $result->path;
$size = $result->size;
}
}
else
{
$size = $result->size;
$path = $result->path;
}
$ext = array (
// archives
'zip' => 'application/zip',
'tar' => 'application/x-tar',
'tgz' => 'application/x-compressed-tar',
'tar.gz' => 'application/x-compressed-tar',
'rar' => 'application/x-rar-compressed',
// documents
'pdf' => 'application/pdf',
'doc' => 'application/msword',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
// executables
'exe' => 'application/octet-stream',
// images
'gif' => 'image/gif',
'png' => 'image/png',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
// audio
'mp3' => 'audio/mpeg',
'wav' => 'audio/x-wav',
// video
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'mp4' => 'video/mp4',
'mov' => 'video/quicktime',
'avi' => 'video/x-msvideo',
'wmv' => 'video/x-ms-wmv',
'mov' => 'video/quicktime',
// mobile
'sis' => 'application/vnd.sybian.install',
'jar' => 'application/java-archive',
'3gp' => 'application/octet-stream',
'nth' => 'application/vnd.nok-s40theme',
'thm' => 'application/vnd.eri.thm',
'amr' => 'audio/amr',
'sisx' => 'application/octet-stream',
'mid' => 'audio/midi',
'swf' => 'application/x-shockwave-flash',
'jad' => 'text/vnd.sun.j2me.app-descriptor'
);
header( "Pragma: public" );
header( "Expires: 0" );
header( "Content-Description: File Transfer");
header( "Content-Type: ".$ext[$type]);
header( "Cache-Control: must-revalidate post-check = 0 pre-check = 0" );
header( "Cache-Control: public" );
header( "Content-Length: $size" );
header( "Content-Disposition: attactment; filename=\"$name\"" );
header( "Content-Transfer-Encoding: binary\n" );
readfile( $path );
exit();
}
else
{
$this->index();
}
}
else
{
$this->index();
}
}
- Likes 1
Comment
-

something else
I think we are made for each other...!!!! My Intro: 30 Year Old Sex: Male Location: Maharashtra/Indian Intrested: Woman. What Do You think.... 
Comment
Comment