88+ results for 'php fgets' (0 ms)

Not the results you expected?

mail.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 406 lines

94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;

95 $header .= 'Return-Path: ' . $this->from . $this->newline;

96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;

97 //$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

98 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

240 $reply = '';

241

242 while ($line = fgets($handle, 515)) {

243 $reply .= $line;

244

279 $reply = '';

280

281 while ($line = fgets($handle, 515)) {

282 $reply .= $line;

283

CHOPPER.C (git://github.com/AnimatorPro/Animator-Pro.git) C · 296 lines ✨ Summary

This is a function that reads a line of text from a file and returns it as a string. It uses a combination of jgetline and po_skip_space to skip leading whitespace and read the rest of the line into a buffer. The function then checks if the line contains an error message, and if so, sets the error_line_number field in the pcb structure to the current line number. If no error is found, the function returns the line as a string.

44 char *po_get_csource_line(Poco_cb *pcb)

45 /*****************************************************************************

46 * po_get_csource_line - Like fgets(), but understands the C concept of a 'line'.

47 ****************************************************************************/

48 {

92

93

94 if (NULL == fgets(buf+icount, buflen-icount, fstack->source.file))

95 {

96 if (mlcomment) /* EOF in multi-line comment */

ChangeLog.zoo (https://bitbucket.org/freebsd/freebsd-head/) Unknown · 701 lines

45

46 * src/cvsrc.c: strdup -> xstrdup, malloc -> xmalloc, comment about

47 fgets lossage.

48

49 * configure, configure.in, Makefile.in: support man and doc

transport_connection.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 257 lines

1 <?php

2 /**

3 * File containing the ezcMailTransportConnection class

48 * transport connection.

49 *

50 * @todo The @ should be removed when PHP doesn't throw warnings for connect problems.

51 *

52 * @throws ezcMailTransportException

78 if ( ezcBaseFeatures::hasExtensionSupport( 'openssl' ) !== true )

79 {

80 throw new ezcBaseExtensionNotFoundException( 'openssl', null, "PHP not configured --with-openssl." );

81 }

82 $this->connection = @stream_socket_client( "ssl://{$server}:{$port}",

204 if ( is_resource( $this->connection ) )

205 {

206 // in case there is a problem with the connection fgets() returns false

207 while ( strpos( $data, self::CRLF ) === false )

208 {

Stream.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 297 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

15

16 /**

17 * Represents an HTTP response message as PHP stream resource

18 */

19 class Stream extends Response

174

175 if (!$headerComplete) {

176 while (false !== ($nextLine = fgets($stream))) {

177 $headersString .= trim($nextLine)."\r\n";

178 if ($nextLine == "\r\n" || $nextLine == "\n") {

vision_utilities.c (https://github.com/kscottz/ClassCrap.git) C · 486 lines

128 /* skip the comments */

129 do

130 fgets(line,sizeof line,input);

131 while(*line=='#');

132

136

137 /* read # of gray levels */

138 fgets(line,sizeof line,input);

139 sscanf(line,"%d\n",&levels);

140 setColors(im, levels);

185 /* skip the comments */

186 do

187 fgets(line,sizeof line,input);

188 while(*line=='#');

189

Stream.php (https://bitbucket.org/gencer/zf2.git) PHP · 298 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

15

16 /**

17 * Represents an HTTP response message as PHP stream resource

18 */

19 class Stream extends Response

174

175 if (!$headerComplete) {

176 while (false !== ($nextLine = fgets($stream))) {

177

178 $headersString .= trim($nextLine)."\r\n";

LoadFreenectData.m (https://gitlab.com/anima_tcs/kinectcapture) Objective C · 205 lines

50 fp = fopen(FileName, 'rb');

51 if(fp~=-1)

52 fheader = fgets(fp, 4);

53 if(~strcmp(fheader, 'FNK0')&&~strcmp(fheader, 'FNK1'))

54 FData.ErrorMessage = 'File Format Mismatch';

64 % FREENECT_RESOLUTION_HIGH = 2, /**< SXGA - 1280x1024 */

65 %} freenect_resolution;

66 curr_rgb_res = uint8(fgets(fp, 1));

67 switch(curr_rgb_res)

68 case 255

79 end

80

81 curr_ir_res = uint8(fgets(fp, 1));

82 switch(curr_ir_res)

83 case 255

Data.php (https://gitlab.com/flyhope/Hiblog) PHP · 404 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Data

388 $fp = fopen($variable, 'r+');

389 if ($fp) {

390 while (!feof($fp) && ($current_line = fgets($fp)) !== false) {

391 $_result .= $current_line;

392 }

Process.php (https://github.com/picaddy/picaddy.git) PHP · 264 lines

1 <?php

2

3 /*

14 /**

15 * Process is a thin wrapper around proc_* functions to ease

16 * start independent PHP processes.

17 *

18 * @author Fabien Potencier <fabien@symfony.com>

46 {

47 if (!function_exists('proc_open')) {

48 throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');

49 }

50

70 * the process is finished via the getOutput() and getErrorOutput() methods.

71 *

72 * @param Closure|string|array $callback A PHP callback to run whenever there is some

73 * output available on STDOUT or STDERR

74 *

pgt-file.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 249 lines

1 <?php

2

3 /**

4 * @file CAS/PGTStorage/pgt-file.php

5 * Basic class for PGT file storage

6 */

107 function PGTStorageFile($cas_parent,$format,$path)

108 {

109 phpCAS::traceBegin();

110 // call the ancestor's constructor

111 $this->PGTStorage($cas_parent);

118

119 if (!preg_match('`^[a-zA-Z]:`', $path)) {

120 phpCAS::error('an absolute path is needed for PGT storage to file');

121 }

122

Voxel_Reader.cxx (https://github.com/jehc/MondocosmOS.git) C++ · 527 lines

137

138 // Header: skip it

139 fgets(line, 64, f);

140

141 // Location, size, number of splits

173 while (!feof(f))

174 {

175 fgets(line, 64, f);

176 if (has_slice(line))

177 {

214

215 // Header: skip it

216 fgets(line, 64, f);

217

218 // Location, size, number of splits

mail.php (https://gitlab.com/2202Programming/navxmxp) PHP · 406 lines

94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;

95 $header .= 'Return-Path: ' . $this->from . $this->newline;

96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;

97 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

98

240 $reply = '';

241

242 while ($line = fgets($handle, 515)) {

243 $reply .= $line;

244

279 $reply = '';

280

281 while ($line = fgets($handle, 515)) {

282 $reply .= $line;

283

mailtrafficlib.php (https://bitbucket.org/Nemcio/kloxo-mr.git) PHP · 183 lines

1 <?php

2

3 class mailtraffic extends lxclass {

48 break;

49 }

50 $string = fgets($fp);

51 $totstring .= $string;

52 if (self::getTimeFromOriginalQmailString($string) > $newtime) {

169

170 while(!feof($fp)) {

171 $string = fgets($fp);

172 if (csa($string, $domainname)) {

173 $total += self::qmailLogConvertString($string);

share.php (https://gitlab.com/AaronDeb/cloudbox) PHP · 190 lines

1 <?PHP

2 include 'init.php';

57 $i = 0;

58

59 while ($line = fgets($fh)) {

60 $fileArray[$i] = $line;

61 $i++;

update_check.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 107 lines

1 <?PHP

2 /**

3 * Endpoint Manager Update Check File

12 if ($rfh) {

13 while (!feof($rfh)) {

14 $line = fgets($rfh);

15 if (strstr($line,"AMPDBUSER=")) {

16 $temp=explode("=",$line);

File.php (https://bitbucket.org/jonbiard/nucleus.git) PHP · 233 lines

1 <?php

2 /**

3 * Class File

36 *

37 * @param string $path The file path

38 * @param string $mode The mode (see PHP's fopen() function)

39 *

40 * @throws IOException When the file path cannot be opened

147 {

148 if ($length === null) {

149 return @fgets($this->fh);

150 }

151

152 return @fgets($this->fh, $length);

153 }

154

Request.php (https://github.com/kiranatama/sagalaya.git) PHP · 203 lines

1 <?php

2 /**

3 * Lithium: the most rad php framework

4 *

5 * @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)

6 * @license http://opensource.org/licenses/bsd-license.php The BSD License

7 */

8

93

94 if (!is_resource($this->_config['input'])) {

95 $this->input = fopen('php://stdin', 'r');

96 }

97 parent::_init();

170 */

171 public function input() {

172 return fgets($this->input);

173 }

174

jpfont_demo.c (https://bitbucket.org/bathtub/rose.git) C · 197 lines

57 }

58

59 fgets (samp_text, 2048, f);

60 fclose (f);

61

PoFileParser.php (https://github.com/LubosRemplik/cakephp.git) PHP · 184 lines

1 <?php

2 /**

3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)

4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

5 *

9 *

10 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

11 * @link https://cakephp.org CakePHP(tm) Project

12 * @since 3.0.0

13 * @license https://opensource.org/licenses/mit-license.php MIT License

83 $stage = null;

84

85 while ($line = fgets($stream)) {

86 $line = trim($line);

87

vnstat.php (https://gitlab.com/billyprice1/QuickBox) PHP · 136 lines

1 <?php

2

3 // Valid values for other parameters you can pass to the script.

6 // the first parameter in the list.

7

8 if (isset($_SERVER['PHP_SELF'])) {

9 $script = $_SERVER['PHP_SELF'];

58 $buffer = '';

59 while (!feof($fd)) {

60 $buffer .= fgets($fd);

61 }

62 $vnstat_data = explode("\n", $buffer);

TestEnvCommand.php (https://gitlab.com/RonLab1987/YupePlusClear) PHP · 182 lines

1 <?php

2 /**

3 * TestEnvCommand

61 $this->createConfigFile(

62 self::COMMAND_DIR.self::CONFIG_DIR,

63 'db-test.php',

64 'db.back.php'

87 $this->readOptions();

88

89 $this->replaceDbOptionsInConfig(self::COMMAND_DIR.self::CONFIG_DIR."/db-test.php");

90 $this->replaceDbOptionsInConfig(self::COMMAND_DIR.self::ROOT_DIR."/codeception.yml");

91 $this->replaceDbOptionsInConfig(self::COMMAND_DIR.self::TESTS_DIR."/acceptance.suite.yml");

99 public function actionReset()

100 {

101 $this->removeConfigFile(self::COMMAND_DIR.self::CONFIG_DIR."/db-test.php");

102 $this->removeConfigFile(self::COMMAND_DIR.self::ROOT_DIR."/codeception.yml");

103 $this->removeConfigFile(self::COMMAND_DIR.self::TESTS_DIR."/acceptance.suite.yml");

op-alpha.php (https://github.com/micheleberg/Calontir-OP.git) PHP · 186 lines

1 <?php

2

3 $file = fopen("op-template.html", "r");

12 while (!feof($file) )

13 {

14 $line = fgets($file, 1024);

15 if ( strstr($line, "insert content here") )

16 {

177 while (!feof($file) )

178 {

179 $line = fgets($file, 1024);

180 echo "$line";

181 }

CliCommand.class.php (https://github.com/zegenie/caspar.git) PHP · 260 lines

1 <?php

2

3 namespace caspar\core;

8 * @author Daniel Andre Eikeland <zegenie@gmail.com>

9 * @version 1.0

10 * @license http://www.opensource.org/licenses/mozilla1.1.php Mozilla Public License 1.1 (MPL 1.1)

11 * @package caspar

12 * @subpackage core

210 protected function _getCliInput()

211 {

212 return trim(fgets(STDIN));

213 }

214

238 public function pressEnterToContinue()

239 {

240 fgets(STDIN);

241 }

242

Error.php (https://bitbucket.org/vaneves/repono.git) PHP · 220 lines

1 <?php

2 /*

3 * Copyright (c) 2012, Valdirene da Cruz Neves Júnior <vaneves@vaneves.com>

15 {

16 /**

17 * Método que é executado quando ocorre algum erro no PHP

18 * @param int $type tipo do erro, que pode ser E_STRICT

19 * @param sintrg $message mensagem do erro

64

65 /**

66 * Método executado quando ocorre algum erro fatal no PHP, esse método é chamado

67 * antes que o PHP pare a execução da página

96 {

97 if (Debug::enabled())

98 return require_once root . 'core/error/debug.php';

99

100 $files = array();

Pop3Connection.php (https://bitbucket.org/lihorne/tedxuw.git) PHP · 175 lines

1 <?php

2

3 /**

9 */

10

11 require_once dirname(__FILE__) . "/../../ClassLoader.php";

12 Swift_ClassLoader::load("Swift_Errors");

13

152 function read()

153 {

154 if (false === $response = fgets($this->handle))

155 {

156 Swift_Errors::trigger(new Swift_ConnectionException("Data could not be read from the POP3 connection."));

function.fetch.php (https://github.com/quarkness/piwik.git) PHP · 221 lines

1 <?php

2 /**

3 * Smarty plugin

13 * Name: fetch<br>

14 * Purpose: fetch file, web or ftp data and display results

15 * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}

16 * (Smarty online manual)

17 * @author Monte Ohrt <monte at ohrt dot com>

31 if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {

32 $_params = array('resource_type' => 'file', 'resource_name' => $params['file']);

33 require_once(SMARTY_CORE_DIR . 'core.is_secure.php');

34 if(!smarty_core_is_secure($_params, $smarty)) {

35 $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');

40 if($fp = @fopen($params['file'],'r')) {

41 while(!feof($fp)) {

42 $content .= fgets ($fp,4096);

43 }

44 fclose($fp);

linuxglue.c (https://github.com/BlitzMaxModules/bah.mod.git) C · 254 lines

88

89 user_dir = NULL;

90 while (fgets (buffer, sizeof (buffer), file))

91 {

92 /* Remove newline at end */

check_syscalls.c (https://bitbucket.org/gfcstanford/rockstar.git) C · 271 lines

199 }

200

201 char *check_fgets(char *ptr, size_t size, FILE *stream) {

202 char *res = fgets(ptr, size, stream);

peering2.php (https://github.com/zetaben/zguide.git) PHP · 202 lines

1 <?php

2 /*

3 * Broker peering simulation (part 2)

5 * @author Ian Barber <ian(dot)barber(at)gmail(dot)com>

6 */

7 include "zmsg.php";

8

9 define("NBR_CLIENTS", 10);

21 $client->send("HELLO");

22 $reply = $client->recv();

23 printf("I: client status: %s%s", $reply, PHP_EOL);

24 }

25 }

48 // Other arguments are our peers' names

49 if($_SERVER['argc'] < 2) {

50 echo "syntax: peering2 me {you}...", PHP_EOL;

51 exit();

52 }

SCQ_QueryProcessor.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 193 lines

1 <?php

2

3 /**

51 }

52

53 $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery(), $results, smwfGetStore() );

54 return self::getResultFromQueryResult( $query_result, $other_params, SMW_OUTPUT_WIKI );

55 }

158

159 $query = self::createQuery( $querystring, $params, $context, null, $extraprintouts );

160 $query_result = smwfGetStore()->getQueryResult( $query );

161 foreach ( $query_result->getResults() as $wiki_page ) {

162 $wiki_page->display_options = $params;

File.php (https://gitlab.com/shinvdu/php-webim) PHP · 180 lines

1 <?php

2 namespace WebIM\Store;

3

26 if (is_file($dir . $file)) {

27 unlink($dir . $file);

28 //echo "delete ".$dir . $file.PHP_EOL;

29 $n++;

30 }

32 self::clearDir($dir . $file . '/');

33 $n++;

34 //echo "rmdir ".$dir . $file . PHP_EOL;

35 //rmdir($dir . $file . '/');

36 }

87 if ($handle)

88 {

89 while (($line = fgets($handle, 4096)) !== false)

90 {

91 $log = json_decode($line);

update.php (https://github.com/jptoto/barcampphilly.git) PHP · 173 lines

1 <?php

2 /**

3 * A simple set of functions to check our version 1.0 update service

10 * wp_version_check() - Check WordPress version against the newest version.

11 *

12 * The WordPress version, PHP version, and Locale is sent. Checks against the WordPress server at

13 * api.wordpress.org. Will only check if PHP has fsockopen enabled and WordPress isn't installing.

24

25 global $wp_version;

26 $php_version = phpversion();

27

28 $current = get_option( 'update_core' );

40 $new_option->version_checked = $wp_version;

41

42 $http_request = "GET /core/version-check/1.1/?version=$wp_version&php=$php_version&locale=$locale HTTP/1.0\r\n";

43 $http_request .= "Host: api.wordpress.org\r\n";

44 $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . get_option('blog_charset') . "\r\n";

PoFileLoader.php (https://gitlab.com/ealexis.t/trends) PHP · 151 lines

1 <?php

2

3 /*

74 $flags = array();

75

76 while ($line = fgets($stream)) {

77 $line = trim($line);

78

LogTarget.php (https://gitlab.com/itlboy/yii2-starter-installed) PHP · 183 lines

1 <?php

2 /**

3 * @link http://www.yiiframework.com/

79 @flock($fp, LOCK_EX);

80 $manifest = '';

81 while (($buffer = fgets($fp)) !== false) {

82 $manifest .= $buffer;

83 }

SConfig.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 195 lines

1 <?php

2 define ("CONF_COMMENT", "#");

3

182 $buffer = "";

183 while (!feof ($fd)) {

184 $buffer .= fgets($fd, 4096);

185 }

186 fclose ($fd);

File.php (https://github.com/Nerutiz/trades.git) PHP · 198 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

24 * @see Zend_Mime_Decode

25 */

26 require_once 'Zend/Mime/Decode.php';

27

28 /**

29 * @see Zend_Mail_Part

30 */

31 require_once 'Zend/Mail/Part.php';

32

33

ZipStreamWrapper.php (https://github.com/vadimonus/moodle.git) PHP · 200 lines

1 <?php

2

3 /**

4 * PHPExcel_Shared_ZipStreamWrapper

5 *

6 * Copyright (c) 2006 - 2015 PHPExcel

20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

21 *

22 * @category PHPExcel

23 * @package PHPExcel_Shared

24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)

25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

26 * @version ##VERSION##, ##DATE##

Stream.php (https://github.com/necrogami/zf2.git) PHP · 291 lines

1 <?php

2 /**

3 * Zend Framework

172

173 if (!$headerComplete) {

174 while (false !== ($nextLine = fgets($stream))) {

175

176 $headersString .= trim($nextLine)."\r\n";

Digest.php (https://github.com/quarkness/piwik.git) PHP · 252 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Digest.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

25 * @see Zend_Auth_Adapter_Interface

26 */

27 // require_once 'Zend/Auth/Adapter/Interface.php';

28

29

187 * @see Zend_Auth_Adapter_Exception

188 */

189 // require_once 'Zend/Auth/Adapter/Exception.php';

190 throw new Zend_Auth_Adapter_Exception("Option '$optionRequired' must be set before authentication");

191 }

dict_xsyn.c (https://github.com/LuaDist/libpq.git) C · 262 lines

180 {

181 /* we can't read the rules before parsing all options! */

182 filename = defGetString(defel);

183 }

184 else

File.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 198 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

24 * @see Zend_Mime_Decode

25 */

26 // // // // // // // // require_once 'Zend/Mime/Decode.php';

27

28 /**

29 * @see Zend_Mail_Part

30 */

31 // // // // // // // // require_once 'Zend/Mail/Part.php';

32

33

ConfigParser.inc.php (https://github.com/ojsde/pkp-lib.git) PHP · 217 lines

1 <?php

2

3 /**

4 * @file classes/config/ConfigParser.inc.php

5 *

6 * Copyright (c) 2000-2012 John Willinsky

10 * @ingroup config

11 *

12 * @brief Class for parsing and modifying php.ini style configuration files.

13 */

14

27 /**

28 * Read a configuration file into a multidimensional array.

29 * This is a replacement for the PHP parse_ini_file function, which does not type setting values.

30 * @param $file string full path to the config file

31 * @return array the configuration data (same format as http://php.net/parse_ini_file)

Pop3Connection.php (https://github.com/apurvgupta12/Ushahidi_Web.git) PHP · 176 lines

1 <?php

2

3 /**

9 */

10

11 require_once dirname(__FILE__) . "/../../ClassLoader.php";

12

13 /**

154 public function read()

155 {

156 if (false === $response = fgets($this->handle))

157 {

158 Swift_ClassLoader::load("Swift_ConnectionException");

SMW_DV_Record.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 298 lines

1 <?php

2 /**

3 * @file

239 if ( !is_null( $propertyDiWikiPage ) ) {

240 $listDiProperty = new SMWDIProperty( '_LIST' );

241 $dataItems = smwfGetStore()->getPropertyValues( $propertyDiWikiPage, $listDiProperty );

242

243 if ( count( $dataItems ) == 1 ) {

271 }

272 ++$i;

273 $propertyValues = $this->m_dataitem->getSemanticData()->getPropertyValues( $propertyDataItem ); // combining this with next line violates PHP strict standards

274 $dataItem = reset( $propertyValues );

275 if ( $dataItem !== false ) {

Config.cpp (https://gitlab.com/DELTA_37/Config) C++ · 746 lines

690 dop = new char[len + 1];

691 fseek(fp, -len - 1, SEEK_CUR);

692 fgets(dop, len + 1, fp);

693 fgetc(fp);

694 if (strncmp(dop, "int", 3) == 0)

streamwrapper.stream-read.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 120 lines

14 <div class="refnamediv">

15 <h1 class="refname">streamWrapper::stream_read</h1>

16 <p class="verinfo">(PHP 4 &gt;= 4.3.2, PHP 5)</p><p class="refpurpose"><span class="refname">streamWrapper::stream_read</span> &mdash; <span class="dc-title">ストリームから読み込む</span></p>

17

18 </div>

27 <p class="para rdfs-comment">

28 このメソッドは、<span class="function"><a href="function.fread.html" class="function">fread()</a></span>

29 および <span class="function"><a href="function.fgets.html" class="function">fgets()</a></span> に対応してコールされます。

30 </p>

31 <blockquote class="note"><p><b class="note">注意</b>:

107 <ul class="simplelist">

108 <li class="member"><span class="function"><a href="function.fread.html" class="function" rel="rdfs-seeAlso">fread()</a> - バイナリセーフなファイルの読み込み</span></li>

109 <li class="member"><span class="function"><a href="function.fgets.html" class="function" rel="rdfs-seeAlso">fgets()</a> - ファイルポインタから 1 行取得する</span></li>

110 </ul>

111 </p>

CSV.php (https://github.com/allinside/Yii-CMS.git) PHP · 411 lines

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

197

198 /**

199 * Loads PHPExcel from file into PHPExcel instance

200 *

201 * @access public

202 * @param string $pFilename

203 * @param PHPExcel $objPHPExcel

204 * @return PHPExcel

205 * @throws Exception

206 */

207 public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)

208 {

209 // Check if file exists

function.fetch.php (https://gitlab.com/flyhope/Hiblog) PHP · 221 lines

1 <?php

2 /**

3 * Smarty plugin

13 * Purpose: fetch file, web or ftp data and display results

14 *

15 * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch}

16 * (Smarty online manual)

17 * @author Monte Ohrt <monte at ohrt dot com>

43 if (isset($template->smarty->security_policy)) {

44 if ($protocol) {

45 // remote resource (or php stream, …)

46 if (!$template->smarty->security_policy->isTrustedUri($params['file'])) {

47 return;

191 fputs($fp, "\r\n");

192 while (!feof($fp)) {

193 $content .= fgets($fp, 4096);

194 }

195 fclose($fp);

File.php (https://gitlab.com/staging06/myproject) PHP · 208 lines

1 <?php

2

3 /**

10 */

11

12 require_once dirname(__FILE__) . "/ClassLoader.php";

13 Swift_ClassLoader::load("Swift_FileException");

14

37 protected $handle = null;

38 /**

39 * The status of magic_quotes in php.ini

40 * @var boolean

41 */

137 if (!$this->EOF())

138 {

139 $ret = fgets($this->handle);

140 }

141 else $ret = false;

EncodingHelper.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 175 lines

1 <?php

2

3 namespace Box\Spout\Common\Helper;

87 $numBytesInBom = strlen($potentialBom);

88

89 $hasBOM = ($this->globalFunctionsHelper->fgets($filePointer, $numBytesInBom + 1) === $potentialBom);

90 }

91

143 $convertedString = $this->globalFunctionsHelper->mb_convert_encoding($string, $sourceEncoding, $targetEncoding);

144 } else {

145 throw new EncodingConversionException("The conversion from $sourceEncoding to $targetEncoding is not supported. Please install \"iconv\" or \"PHP Intl\".");

146 }

147

165 /**

166 * Returns whether "mb_string" functions can be used.

167 * These functions come with the PHP Intl package.

168 *

169 * @return bool TRUE if "mb_string" functions are available and can be used, FALSE otherwise

tracefile-analyser.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 207 lines

1 <?php

2

3

41 function showUsage()

42 {

43 echo "usage:\n\tphp run-cli tracefile [sortkey] [elements]\n\n";

44 echo "Allowed sortkeys:\n\tcalls, time-inclusive, memory-inclusive, time-own, memory-own\n";

45 die();

76

77 $this->stackFunctions = array();

78 $header1 = fgets( $this->handle );

79 $header2 = fgets( $this->handle );

94 while ( !feof( $this->handle ) )

95 {

96 $buffer = fgets( $this->handle, 4096 );

97 $read += strlen( $buffer );

98 $this->parseLine( $buffer );

Digest.php (https://github.com/kervin/kyzstudio.git) PHP · 252 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Digest.php 23088 2010-10-11 19:53:24Z padraic $

21 */

22

25 * @see Zend_Auth_Adapter_Interface

26 */

27 #require_once 'Zend/Auth/Adapter/Interface.php';

28

29

187 * @see Zend_Auth_Adapter_Exception

188 */

189 #require_once 'Zend/Auth/Adapter/Exception.php';

190 throw new Zend_Auth_Adapter_Exception("Option '$optionRequired' must be set before authentication");

191 }

POCOLIB.TXT (git://github.com/AnimatorPro/Animator-Pro.git) Plain Text · 409 lines

284 int putc(int c, FILE *f);

285 int fputc(int c, FILE *f);

286 char *fgets(char *s, int maxlen, FILE *f);

287 int fputs(char *s, FILE *f);

288 int *__GetErrnoPointer(void);

common.php (https://github.com/gcao/jsgameviewer4bbs.git) PHP · 135 lines

1 <?php

2 /************************************************************************

3 * CSS and Javascript Combinator 0.5

98 $file = @fopen($path, 'r');

99 while (!feof($file)){

100 $buffer = trim(fgets($file));

101 if ($buffer{0} == '*' || ($buffer{0} == '/' &&

102 ($buffer{1} == '*' || $buffer{1} == '/')))

FilesystemAdapter.php (https://gitlab.com/pr0055/symfonypizza) PHP · 158 lines

1 <?php

2

3 /*

64 continue;

65 }

66 if ($now >= (int) $expiresAt = fgets($h)) {

67 fclose($h);

68 if (isset($expiresAt[0])) {

70 }

71 } else {

72 $i = rawurldecode(rtrim(fgets($h)));

73 $value = stream_get_contents($h);

74 fclose($h);

RGenerator.php (https://bitbucket.org/mxelgin/arch1v.git) PHP · 211 lines

1 <?php

2 /**

3 * Rights generator component class file.

110 {

111 ++$lineNumber;

112 $line = fgets($file);

113 preg_match('/public[ \t]+function[ \t]+action([A-Z]{1}[a-zA-Z0-9]+)[ \t]*\(/', $line, $matches);

114 if( $matches!==array() )

glue.h (https://github.com/BlitzMaxModules/wx.mod.git) C Header · 129 lines

64 BBString * bmx_wxfilename_getshortpath(MaxFileName * fname);

65 void bmx_wxfilename_getsize(MaxFileName * fname, BBInt64 * size);

66 void bmx_wxfilename_fgetsize(BBString * filename, BBInt64 * size);

67 BBString * bmx_wxfilename_gethumanreadablesize(MaxFileName * fname, BBString * failmsg, int precision);

68 BBString * bmx_wxfilename_fgethumanreadablesize(BBInt64 size, BBString * failmsg, int precision);

system.php (https://github.com/transitiv/ninja.git) PHP · 227 lines

1 <?php defined('SYSPATH') OR die('No direct access allowed.');

2

3 /**

151 return false;

152 $found_section = false;

153 while ($raw_line = fgets($fh)) {

154 $line = trim($raw_line);

155 if (!strlen($line) || $line{0} === '#')

reverseRead.php (https://github.com/hpgihan/cronus.git) PHP · 224 lines

1 <?php

2 /**

3 * Functionatility for line by line reverse reading of a file. It is done by blockwise

198 }

199

200 return rtrim(fgets($this->fileHandle));

201 }

202

SmtpMailer.php (https://gitlab.com/paveltizek/shop) PHP · 195 lines

1 <?php

2

3 /**

184 {

185 $s = '';

186 while (($line = fgets($this->connection, 1e3)) != NULL) { // intentionally ==

187 $s .= $line;

188 if (substr($line, 3, 1) === ' ') {

checkInputXFiles.php (https://github.com/MengZhang/dssat-xfile-upload.git) PHP · 137 lines

1 <?php

2 include("parts_checkSession.php");

3 include("function.php");

4 include("dbTempUpdate.php");

28 while(!feof($file)) {

29 $lineNo++;

30 $line = fgets($file);

31 $flg = judgeContentType($line, $flg); // explode,splitStrToArray

32 //echo "[line".$lineNo."],[".$flg[0]."],[".$flg[1]."],[".$flg[2]."]<br>"; //debug

61 $_SESSION["dssat_steps"] = 2;

62 }

63 $target = "inputFiles02.php";

64

65 // Check if weather data is avaliable in DB

updatetipafriendpolicy.php (https://github.com/GunioRobot/ezpublish.git) PHP · 120 lines

1 #!/usr/bin/env php

2 <?php

8 */

9

10 require 'autoload.php';

11

12 $cli = eZCLI::instance();

69 $userInput = '';

70 $usersToAssign = array();

71 $stdin = fopen( "php://stdin", "r+" );

72 foreach ( $topUserNodes as $userNode )

73 {

78 $cli->output( "Note: the '$name' group/user is anonymous." );

79 $cli->output( "Assign 'Tipafriend Role' to the '$name' group/user? y(yes)/n(no)/a(all)/s(skip all): ", false );

80 $userInput = fgets( $stdin );

81 $userInput = trim( $userInput );

82 }

convertImageProductionTest.php (https://github.com/richhl/kalturaCE.git) PHP · 110 lines

1 <?php

2

3 require_once 'convertImageTester.php';

4 require_once 'bootstrap.php';

5

6 /**

33 if (($fileHundler = fopen($testsFile, "r")) === false)

34 die ('unable to read tests file [' . $testsFile . ']');

35 fgets($fileHundler); // discard form header line

36 while (!feof($fileHundler)) {

37 $line = fgets($fileHundler);

82 if ($status === false)

83 echo 'unable to convert [' . $tester->getSourceFile() . '] with parameterrs: ' .

84 print_r($tester->getParams()) . PHP_EOL;

85 // assert(true === $status);

86

Maildir.php (https://github.com/bhaumik25/zend-framework.git) PHP · 222 lines

1 <?php

2 /**

3 * Zend Framework

22 * Zend_Mail_Abstract

23 */

24 require_once 'Zend/Mail/Abstract.php';

25

26 /**

27 * Zend_Mail_Message

28 */

29 require_once 'Zend/Mail/Message.php';

30

31 /**

32 * Zend_Mail_Exception

33 */

34 require_once 'Zend/Mail/Exception.php';

35

36

libc.rb (https://github.com/postmodern/ffi-libc.git) Ruby · 220 lines

108 attach_function :fwrite, [:buffer_in, :size_t, :size_t, :FILE], :size_t

109 attach_function :fgetc, [:FILE], :int

110 attach_function :fgets, [:buffer_out, :int, :FILE], :pointer

111 attach_function :fputc, [:int, :FILE], :int

112 attach_function :fputs, [:buffer_in, :FILE], :int

main.c (https://github.com/amery/clip-angelo.git) C · 388 lines

58 init_Coll(&cmp, 0, cmp_UniRecord);

59

60 while (fgets(buf, sizeof(buf), stdin))

61 {

62 int l;

Digest.php (https://github.com/Doap/iCms---intelligent-Content-management-system.git) PHP · 252 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Digest.php 23088 2010-10-11 19:53:24Z padraic $

21 */

22

25 * @see Zend_Auth_Adapter_Interface

26 */

27 require_once 'Zend/Auth/Adapter/Interface.php';

28

29

187 * @see Zend_Auth_Adapter_Exception

188 */

189 require_once 'Zend/Auth/Adapter/Exception.php';

190 throw new Zend_Auth_Adapter_Exception("Option '$optionRequired' must be set before authentication");

191 }

PopBeforeSmtpPlugin.php (https://bitbucket.org/antonyravel/cape-resorts.git) PHP · 286 lines

1 <?php

2

3 /*

155 $this->_socket = $socket;

156

157 if (false === $greeting = fgets($this->_socket))

158 {

159 throw new Swift_Plugins_Pop_Pop3Exception(

246 }

247

248 if (false === $response = fgets($this->_socket))

249 {

250 throw new Swift_Plugins_Pop_Pop3Exception(

Delimiter.php (https://github.com/sbourget/moodle.git) PHP · 151 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Reader\Csv;

4

5 class Delimiter

130 do {

131 // Get the next line in the file

132 $newLine = fgets($this->fileHandle);

133

134 // Return false if there is no next line

FS_Socket.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 266 lines

1 <?php defined('SYSPATH') or die('No direct access allowed.');

2 /**

3 * FS_Socket.php - This supports ESLconnection when the native ESL

160 {

161 if($this->validateConnection()) {

162 return fgets($this->connection, 1024);

163 }

164

Tiarra.php (https://github.com/tyoro/tiarraMetro.git) PHP · 253 lines

1 <?php

2 /**

3 * Net_Socket_Tiarra

5 * Using socket of tiarra to send message.

6 *

7 * PHP version 5

8 *

9 * The MIT License

26 * @license http://openpear.org/package/Net_Socket_Tiarra

27 * @version SVN: $Id$

28 * @link http://pear.php.net/package/Net_Socket_Tiarra

29 */

30

31

32 require_once 'Net/Socket/Tiarra/Exception.php';

33

34 /**

shop.php (https://github.com/geekbuntu/Microweber.git) PHP · 170 lines

1 <?php

2

3 class Shop extends Controller {

7 parent::Controller ();

8

9 require_once (APPPATH . 'controllers/default_constructor.php');

10 // require_once (APPPATH . 'controllers/api/default_constructor.php');

53 fputs ( $fp, $header . $req );

54 while ( ! feof ( $fp ) ) {

55 $res = fgets ( $fp, 1024 );

56 if (strcmp ( $res, "VERIFIED" ) == 0) {

57 // TODO:

SemanticGlossaryBackend.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 99 lines

1 <?php

2

3 /**

26

27 // get the store

28 $store = smwfGetStore();

29

30 // Create query

mass-reapprov.php (https://github.com/Eyepea/xivo-gallifrey.git) PHP · 148 lines

1 #! /usr/bin/php -q

2 <?php

104

105 fwrite($fp, $write);

106 $recv = trim(fgets($fp,32));

107

108 if(preg_match('/^HTTP\/1\.(x|1|0) 200 OK/',$recv) === 1)

File.php (https://github.com/leerbag/zf2.git) PHP · 177 lines

1 <?php

2 /**

3 * Zend Framework

72 $header = '';

73 $endPos = isset($params['endPos']) ? $params['endPos'] : null;

74 while (($endPos === null || ftell($this->_fh) < $endPos) && trim($line = fgets($this->_fh))) {

75 $header .= $line;

76 }

99 fseek($this->_fh, $pos);

100 while (!feof($this->_fh) && ($endPos === null || $pos < $endPos)) {

101 $line = fgets($this->_fh);

102 if ($line === false) {

103 if (feof($this->_fh)) {

Http.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 87 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Dataflow

23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

42 File to upload: <input type="file" name="io_file"/> <input type="submit" value="Upload"/>

43 </form>

44 <?php

45 exit;

46 }

Http.php (https://github.com/rgranadino/magento-mirror.git) PHP · 87 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Dataflow

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

42 File to upload: <input type="file" name="io_file"/> <input type="submit" value="Upload"/>

43 </form>

44 <?php

45 exit;

46 }

kexec-s390.c (https://gitlab.com/adam.lukaitis/kexec-tools) C · 116 lines

53

54 /* Setup the compare string properly. */

55 while(fgets(line,sizeof(line),fp) != 0) {

56 unsigned long long start, end;

57 int cons;

Digest.php (https://bitbucket.org/haichau59/manga.git) PHP · 252 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Digest.php 24594 2012-01-05 21:27:01Z matthew $

21 */

22

25 * @see Zend_Auth_Adapter_Interface

26 */

27 //require_once 'Zend/Auth/Adapter/Interface.php';

28

29

187 * @see Zend_Auth_Adapter_Exception

188 */

189 //require_once 'Zend/Auth/Adapter/Exception.php';

190 throw new Zend_Auth_Adapter_Exception("Option '$optionRequired' must be set before authentication");

191 }

Http.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 87 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Dataflow

23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

42 File to upload: <input type="file" name="io_file"/> <input type="submit" value="Upload"/>

43 </form>

44 <?php

45 exit;

46 }

Digest.php (https://bitbucket.org/hmancvs/farmis.git) PHP · 252 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Digest.php,v 1.1 2011/11/03 08:29:37 smusoke Exp $

21 */

22

25 * @see Zend_Auth_Adapter_Interface

26 */

27 require_once 'Zend/Auth/Adapter/Interface.php';

28

29

187 * @see Zend_Auth_Adapter_Exception

188 */

189 require_once 'Zend/Auth/Adapter/Exception.php';

190 throw new Zend_Auth_Adapter_Exception("Option '$optionRequired' must be set before authentication");

191 }

SocketProgressBar.php (https://github.com/GunioRobot/diggin.git) PHP · 232 lines

1 <?php

2

3 // require_once 'Zend/Http/Client/Adapter/Socket.php';

20 private function getProgressBar()

21 {

22 if (PHP_SAPI != 'cli') throw new \RuntimeException();

23

24 if (!$this->_progressBar) {

25 // require_once 'Zend/ProgressBar/Adapter/Console.php';

26 // require_once 'Zend/ProgressBar.php';

45 $stream = !empty($this->config['stream']);

46

47 while (($line = @fgets($this->socket)) !== false) {

48 $gotStatus = $gotStatus || (strpos($line, 'HTTP') !== false);

49 if ($gotStatus) {

S_confedit.php (https://github.com/Mithgol/Nephtsys.git) PHP · 343 lines

1 <?php

2 /*\

3 / This is a part of PhFiTo (aka PHP Fido Tosser)

7 /// See docs/license for details

8 //

9 / $Id: S_confedit.php,v 1.5 2011/01/08 12:21:09 kocharin Exp $

10 \*/

11

230 $l = 0;

231 $lines = array();

232 while ($l = fgets($f,1024)) $lines[] = chop($l);

233 fclose($f);

234 if ($exists):

281 $result = 1;

282 if (is_file($tofile) && ($f = @fopen($tofile,'r+'))):

283 while(fgets($f,10240)) $result++;

284 fseek($f,-1,2);

285 $last = fread($f,1);

php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 4699 lines

6 <MODE NAME="php" FILE="php.xml"

7 FILE_NAME_GLOB="*.{php3,php4,php5,php,phtml}"

8 FIRST_LINE_GLOB="&lt;?php*" />

32

33 <RULES IGNORE_CASE="TRUE">

34 <!-- PHP -->

35 <SPAN TYPE="MARKUP" DELEGATE="PHP">

36 <BEGIN>&lt;?php</BEGIN>

37 <END>?&gt;</END>

38 </SPAN>

39

40 <SPAN TYPE="MARKUP" DELEGATE="PHP">

41 <BEGIN>&lt;?</BEGIN>

42 <END>?&gt;</END>

ccache.c (https://swig.svn.sourceforge.net/svnroot/swig) C · 1389 lines ✨ Summary

This C code implements a caching system for compilers and other build tools. It allows users to specify a directory where cached results can be stored, and provides options for managing cache limits, clearing caches, and setting verbosity levels. The program also handles errors and networking issues, such as duping stderr to prevent caching of error messages.

328 char out_filename[FILENAME_MAX + 1];

329 char out_filename_cache[FILENAME_MAX + 1];

330 while (fgets(out_filename, FILENAME_MAX, file)) {

331 char *linefeed = strchr(out_filename, '\n');

332 if (linefeed) {

672 int retrieved_files_count = 0;

673 x_utimes(outfiles);

674 while (fgets(out_filename, FILENAME_MAX, file)) {

675 char *linefeed = strchr(out_filename, '\n');

676 if (linefeed) {

php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines

11 </PROPS>

12 <RULES IGNORE_CASE="TRUE">

13 <SPAN TYPE="MARKUP" DELEGATE="PHP">

14 <BEGIN>&lt;?php</BEGIN>

16 </SPAN>

17

18 <SPAN TYPE="MARKUP" DELEGATE="PHP">

19 <BEGIN>&lt;?</BEGIN>

20 <END>?&gt;</END>

21 </SPAN>

22

23 <SPAN TYPE="MARKUP" DELEGATE="PHP">

24 <BEGIN>&lt;%=</BEGIN>

25 <END>%&gt;</END>

64

65 <RULES SET="TAGS" DEFAULT="MARKUP">

66 <SPAN TYPE="MARKUP" DELEGATE="PHP">

67 <BEGIN>&lt;?php</BEGIN>

alert.c (http://opensource.apple.com/release/mac-os-x-1074/) C · 331 lines

292 }

293

294 <span class="enscript-keyword">while</span> (fgets(buf, MAXLINE, fp) != NULL)

295 {

296 <span class="enscript-keyword">if</span> (!strncmp(buf+1, SEARCH_MESSAGE, len))