PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Aug 22, 2019 3:12 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Upload Script
PostPosted: Tue Jul 06, 2004 2:47 pm 
Offline
Forum Commoner
User avatar

Joined: Fri Nov 21, 2003 6:02 pm
Posts: 61
Location: connecticut, usa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 3:01 pm 
Offline
Forum Regular
User avatar

Joined: Thu Jan 08, 2004 12:22 pm
Posts: 926
Location: ecuador


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 3:05 pm 
Offline
Forum Commoner
User avatar

Joined: Fri Nov 21, 2003 6:02 pm
Posts: 61
Location: connecticut, usa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 3:08 pm 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 3:20 pm 
Offline
Forum Commoner
User avatar

Joined: Fri Nov 21, 2003 6:02 pm
Posts: 61
Location: connecticut, usa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 3:30 pm 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 4:04 pm 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA
text file filter (untested)
Syntax: [ Download ] [ Hide ]
<?php



function is_text_file($filename)

{

  if(!is_readable($filename)) return false;

  $data = file_get_contents($filename);

  $bad = false;

  for($x = 0, $y = strlen($data); !$bad && $x < $y; $x++)

  {

    $bad = ( ord($data{$x}) > 127 );

  }



  return !$bad;

}



?>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group