100+ results for 'php fputs'

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;

253 }

254 } else {

255 fputs($handle, 'HELO ' . getenv('SERVER_NAME') . $this->crlf);

256

257 $reply = '';

293

294 if (!is_array($this->to)) {

295 fputs($handle, 'RCPT TO: <' . $this->to . '>' . $this->crlf);

296

297 $reply = '';

rotz-export.c (https://bitbucket.org/hroptatyr/rotz.git) C · 208 lines

71 const char *tgt = rotz_massage_name(vld);

72

73 fputs(vtx, stdout);

74 fputc('\t', stdout);

75 fputs(tgt, stdout);

184

185 if (UNLIKELY((ctx = make_rotz(db)) == NULL)) {

186 fputs("Error opening rotz datastore\n", stderr);

187 return 1;

188 }

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

253 }

254 } else {

255 fputs($handle, 'HELO ' . getenv('SERVER_NAME') . $this->crlf);

256

257 $reply = '';

293

294 if (!is_array($this->to)) {

295 fputs($handle, 'RCPT TO: <' . $this->to . '>' . $this->crlf);

296

297 $reply = '';

version_helper.php (https://bitbucket.org/tdevonshire/guinness-jazz-festival.git) PHP · 250 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2

3 /**

57 if (is_resource($fp))

58 {

59 fputs($fp,"GET ".$dl_page_url." HTTP/1.0\r\n" );

60 fputs($fp,"Host: ".$target['host'] . "\r\n" );

61 fputs($fp,"User-Agent: EE/EllisLab PHP/\r\n");

62 fputs($fp,"If-Modified-Since: Fri, 01 Jan 2004 12:24:04\r\n\r\n");

247

248

249 /* End of file version_helper.php */

250 /* Location: ./system/expressionengine/helpers/version_helper.php */

ps_cashondel.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 180 lines

1 <?php

2 if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );

3 /**

4 * @version $Id: ps_cashondelpay.php,v 1.4 2005/05/27 19:33:57 ei

5 *

6 * a special type of 'cash on delivey':

7 * its fee depend on total sum

8 *

9 * @version $Id: ps_cashondel.php 1095 2007-12-19 20:19:16Z soeren_nb $

10 * @package VirtueMart

11 * @subpackage payment

12 * @copyright Copyright (C) 2004-2007 soeren - All rights reserved.

13 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php

14 * VirtueMart is free software. This version may have been modified pursuant

15 * to the GNU General Public License, and as distributed it includes or

Config.php (https://github.com/okonomi/ethna.git) PHP · 198 lines

1 <?php

2 // vim: foldmethod=marker

3 /**

4 * Config.php

5 *

6 * @author Masaki Fujimoto <fujimoto@php.net>

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

8 * @package Ethna

9 * @version $Id: f48b583e876f0809c6ff9980349bc3924464a40c $

14 * 設定クラス

15 *

16 * @author Masaki Fujimoto <fujimoto@php.net>

17 * @access public

18 * @package Ethna

webformmailer.php (https://github.com/wesleyzhao/trailertrack.git) PHP · 218 lines

1 <?php

2

3 if ( !isset($_SERVER['SPI'])) {

148 }

149 }

150 fputs($fp,"$csvkeys\n");

151 fputs($fp,"$csvvals\n");

152 break;

153 case ".html":

154 fputs($fp,"<table border=\"1\" cellspacing=\"1\" cellpadding=\"2\">\n");

155 break;

156 case ".xml":

157 fputs($fp,"<form>\n");

158 break;

159 }

Sntp.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 119 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Sntp.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $

20 */

21

23 * Zend_TimeSync_Protocol

24 */

25 require_once 'Zend/TimeSync/Protocol.php';

26

27 /**

96 $this->_connect();

97 $this->_delay = time();

98 fputs($this->_socket, $data);

99 }

100

yylex.c (https://bitbucket.org/kmv/aeriebsd-src.git) C · 220 lines

108

109 case SCDECL:

110 fputs( "%s", stderr );

111 break;

112

113 case XSCDECL:

114 fputs( "%x", stderr );

115 break;

116

117 case SECTEND:

118 fputs( "%%\n", stderr );

119

120 /* We set beglin to be true so we'll start

rpc.php (https://github.com/sakaishinji/concrete5-1.git) PHP · 111 lines

1 <?php

2 /**

3 * $Id: rpc.php 822 2008-04-28 13:45:03Z spocke $

7 */

8

9 require_once("./includes/general.php");

10

11 // Set RPC response headers

35 if (!$raw) {

36 if (!function_exists('file_get_contents')) {

37 $fp = fopen("php://input", "r");

38 if ($fp) {

39 $raw = "";

45 }

46 } else

47 $raw = "" . file_get_contents("php://input");

48 }

49

Writer.php (https://github.com/pauln/moodle.git) PHP · 101 lines

1 <?php

2

3 namespace Box\Spout\Writer\CSV;

64 {

65 // Adds UTF-8 BOM for Unicode compatibility

66 $this->globalFunctionsHelper->fputs($this->filePointer, EncodingHelper::BOM_UTF8);

67 }

68

kludge.h (https://github.com/curriegrad2004/FreeSWITCH.git) C Header · 97 lines

34 #if NO_STDIO_PROTOS /* Missing prototypes for "simple" functions */

35 int (puts)(char const *);

36 int (fputs)(char const *, FILE *);

37 void (rewind)(FILE *);

38 int (fflush)(FILE *);

rpc.php (https://github.com/rii-J/concrete5-de.git) PHP · 111 lines

1 <?php

2 /**

3 * $Id: rpc.php 822 2008-04-28 13:45:03Z spocke $

7 */

8

9 require_once("./includes/general.php");

10

11 // Set RPC response headers

35 if (!$raw) {

36 if (!function_exists('file_get_contents')) {

37 $fp = fopen("php://input", "r");

38 if ($fp) {

39 $raw = "";

45 }

46 } else

47 $raw = "" . file_get_contents("php://input");

48 }

49

rpc.php (https://github.com/rii-J/concrete5-de.git) PHP · 111 lines

1 <?php

2 /**

3 * $Id: rpc.php 822 2008-04-28 13:45:03Z spocke $

7 */

8

9 require_once("./includes/general.php");

10

11 // Set RPC response headers

35 if (!$raw) {

36 if (!function_exists('file_get_contents')) {

37 $fp = fopen("php://input", "r");

38 if ($fp) {

39 $raw = "";

45 }

46 } else

47 $raw = "" . file_get_contents("php://input");

48 }

49

giffix.c (https://github.com/onecoolx/picasso.git) C · 216 lines

86 /* Dump out exactly same screen information: */

87 /* coverity[var_deref_op] */

88 if (EGifPutScreenDesc(GifFileOut,

89 GifFileIn->SWidth, GifFileIn->SHeight,

90 GifFileIn->SColorResolution, GifFileIn->SBackGroundColor,

Sntp.php (https://github.com/coder-int21h/noses.git) PHP · 119 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Sntp.php 10835 2008-08-08 22:28:26Z thomas $

20 */

21

23 * Zend_TimeSync_Protocol

24 */

25 require_once 'Zend/TimeSync/Protocol.php';

26

27 /**

96 $this->_connect();

97 $this->_delay = time();

98 fputs($this->_socket, $data);

99 }

100

Sntp.php (https://github.com/albertobraschi/NFS.git) PHP · 119 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Sntp.php 10835 2008-08-08 22:28:26Z thomas $

20 */

21

23 * Zend_TimeSync_Protocol

24 */

25 #require_once 'Zend/TimeSync/Protocol.php';

26

27 /**

96 $this->_connect();

97 $this->_delay = time();

98 fputs($this->_socket, $data);

99 }

100

nabaztag.php (https://github.com/mkweb/NabServ.git) PHP · 425 lines

1 <?php

2 namespace nabserv;

3

386

387 $fh = fopen($this->file, 'w');

388 fputs($fh, $content);

389 fclose($fh);

390

404

405 $fh = fopen($this->configFile, 'w');

406 fputs($fh, $content);

407 fclose($fh);

408

Paypal.php (https://github.com/psykomo/kutump.git) PHP · 123 lines

1 <?php

2

3 /**

11 * @package Payment Gateway

12 * @category Library

13 * @author Md Emran Hasan <phpfour@gmail.com>

14 * @link http://www.phpfour.com

15 */

16

17 include_once ('PaymentGateway.php');

18

19 class Paypal extends PaymentGateway

91 // Post the data back to paypal

92

93 fputs($fp, "POST ".$urlParsed['path']." HTTP/1.1\r\n");

94 fputs($fp, "Host: ".$urlParsed['host']."\r\n");

class.wsdlcache.php (https://github.com/Matmon/WP-e-Commerce.git) PHP · 209 lines

1 <?php

2 /*

3 The NuSOAP project home is:

13 * @author Scott Nichol <snichol@users.sourceforge.net>

14 * @author Ingo Fischer <ingo@apollon.de>

15 * @version $Id: class.wsdlcache.php,v 1.7 2007/04/17 16:34:03 snichol Exp $

16 * @access public

17 */

152 return false;

153 }

154 fputs($fp, $s);

155 fclose($fp);

156 $this->debug("Put $wsdl_instance->wsdl ($filename) in cache");

class.wsdlcache.php (https://github.com/Dolibarr/obsolete.git) PHP · 209 lines

1 <?php

2 /*

3 The NuSOAP project home is:

13 * @author Scott Nichol <snichol@users.sourceforge.net>

14 * @author Ingo Fischer <ingo@apollon.de>

15 * @version $Id: class.wsdlcache.php,v 1.1 2010/04/13 13:41:13 grandoc Exp $

16 * @access public

17 */

152 return false;

153 }

154 fputs($fp, $s);

155 fclose($fp);

156 $this->debug("Put $wsdl_instance->wsdl ($filename) in cache");

class.captcha.php (https://github.com/MaBelleEcole/Main.git) PHP · 150 lines

1 <?php

2

3 /*

5 This program and it's moduls are Open Source in terms of General Public License (GPL) v2.0

6

7 class.captcha.php (captcha class module)

8

9 Last modification: 2005-09-05

118 {

119 $fh = fopen( $this->temp_dir.'/'.'cap_'.$this->session_key.'.txt', "w" );

120 fputs( $fh, md5( strtolower( $captcha_str ) ) );

121 return( md5( strtolower( $captcha_str ) ) );

122 }

kanji-encoding.lib.php (https://gitlab.com/albert925/lading-ach) PHP · 152 lines

1 <?php

2 /* vim: set expandtab sw=4 ts=4 sts=4: */

3 /**

5 * language)

6 *

7 * PHP4 configure requirements:

8 * --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex

9 *

11 *

12 * @version $Id$

13 * @package phpMyAdmin

14 */

15 if (! defined('PHPMYADMIN')) {

18

19 /**

20 * Gets the php internal encoding codes and sets the available encoding

21 * codes list

22 * 2002/1/4 by Y.Kawada

Mail.php (https://bitbucket.org/smr/omc.git) PHP · 140 lines

1 <?php

2 /**

3 * Class that deals mainly with email sending, aiming to provide a small API to PEAR's SASL/SMTP monster classes

49 private function SendCMD($CMD)

50 {

51 fputs($this->skt, $CMD . self::CRLF);

52

53 return $this->GetResponse();

BuiltinWebServer.php (https://github.com/yuya-takeyama/Phunk.git) PHP · 147 lines

1 <?php

2

3 namespace Phunk\Handler;

36 while (1) {

37 if (false === $this->_check_process()) {

38 fputs(STDERR, "server stopped.\n");

39 break;

40 }

54 print fread($r, 8192);

55 } else if ($this->_pipes[2] === $r) {

56 fputs(STDERR, fread($r, 8192));

57 }

58 }

85 $php = $_SERVER['_'];

86 } else {

87 $php = PHP_BINDIR . DIRECTORY_SEPARATOR . 'php';

88 }

89

File.php (https://github.com/EthanBlast/Glam-Star-Life.git) PHP · 237 lines

1 <?php

2

3 if (!defined('W3_CACHE_FILE_EXPIRE_MAX')) {

8 * File class

9 */

10 require_once W3TC_LIB_W3_DIR . '/Cache/Base.php';

11

12 /**

30

31 /**

32 * PHP5 constructor

33 *

34 * @param array $config

41

42 /**

43 * PHP4 constructor

44 *

45 * @paran array $config

box.cpp (https://bitbucket.org/freebsd/freebsd-head/) C++ · 613 lines ✨ Summary

This C++ code is part of a typesetting system, generating LaTeX commands for boxes and spacing elements. It defines various box classes (e.g., box, pointer_box, simple_box) that compute metrics (width, height, depth) and output corresponding LaTeX commands. The code also handles special cases like tabs, quoted text, and spaces, allowing for flexible typesetting control.

540 {

541 if (text)

542 fputs(text, stdout);

543 }

544

updatePerson.php (https://gitlab.com/kirr/erp5) PHP · 143 lines

1 <?php

2 include("includes/config.inc.php");

3 include("includes/function.php");

4

5

122 $now = Date('dmY h:i:s');

123 $fp = fopen("test.txt","a"); // ouverture du fichier en écriture

124 fputs($fp, "\n---"); // on va a la ligne

125 fputs($fp, $now." - ".$personUpdateQuery2.""); // on écrit le nom et email dans le fichier

httprequest.php (https://github.com/wildanm/Jibas.git) PHP · 94 lines

21 * You should have received a copy of the GNU General Public License

22 **[N]**/ ?>

23 <?php

24 function http_request(

25 $verb = 'GET', /* HTTP Request Method (GET and POST supported) */

83 stream_set_timeout($fp, 0, $timeout * 1000);

84

85 fputs($fp, $req);

86 while ($line = fgets($fp)) $ret .= $line;

87 fclose($fp);

trackInput.php (https://github.com/kadewe/rea.framework.git) PHP · 173 lines

1 <?php

2 /* ----------------------------------------------------------------------

3

124

125 $file = fopen($path, "w");

126 fputs($file,$xml);

127 fclose($file);

128

descriptor.c (https://github.com/gurjeet/postgres.git) C · 346 lines

59 case ECPGt_unsigned_long_long:

60 case ECPGt_const:

61 fputs(name, yyout);

62 break;

63 default:

192 }

193 drop_assignments();

194 fputs("ECPGd_EODT);\n", yyout);

195

196 whenever_action(2 | 1);

302 }

303 drop_assignments();

304 fputs("ECPGd_EODT);\n", yyout);

305

306 whenever_action(2 | 1);

ame_cache.php (https://github.com/rcdesign/vb-foreign_mod_fixes.git) PHP · 233 lines

1 <?php

2

3 /**

19 /**

20 * This baby takes an array (i.e. data structure)

21 * and writes it out into a php file which can be 'included'

22 * into code instead of querying the DB and building the array up.

23 * Note: This class asserts all data is correct!

34

35 /**

36 * The name of the file we will overwrite. We are appending .php

37 *

38 * @var unknown_type

127 );

128

129 if (file_exists($path . "/testiname.php"))

130 {

131

PlainHTTPFetcher.php (https://github.com/clioweb/DH-Answers.git) PHP · 160 lines

1 <?php

2

3 /**

5 * implementation.

6 *

7 * PHP versions 4 and 5

8 *

9 * LICENSE: See the COPYING file included in this distribution.

18 * Interface import; need to inherit from the base HTTP fetcher class.

19 */

20 require_once("HTTPFetcher.php");

21

22 /**

34 /**

35 * Fetches the specified URL using optional extra headers and

36 * returns the server's response. Uses plain PHP library calls

37 * and doesn't rely on any extensions.

38 *

identify.c (https://bitbucket.org/bosp/benchmarks-parsec.git) C · 119 lines

24 % obtain a copy of the License at %

25 % %

26 % http://www.imagemagick.org/script/license.php %

27 % %

28 % Unless required by applicable law or agreed to in writing, software %

109 if (text != (char *) NULL)

110 {

111 (void) fputs(text,stdout);

112 (void) fputc('\n',stdout);

113 text=DestroyString(text);

7_FixDropdownData.php (https://bitbucket.org/hatim_alam/sugar-8.git) PHP · 132 lines

1 <?php

2 /*

3 * Your installation or use of this SugarCRM file is subject to the applicable

34 }

35

36 foreach (glob($originalPath . '/*.lang.php') as $file) {

37 require $file;

38 $fileParts = explode('/', $file);

46 // $app_list_strings DD strings

47 if (is_array($fields) && $this->isCustomField($name, $fields, $file)) {

48 $newFileName = $newPath . '/' . $lang . '.sugar_' . $name . '.php';

49 $this->write_to_file($newFileName, 'app_list_strings', $name, $fields, true);

50 }

122 $output = "";

123 if ($timeHeader) {

124 $output = "<?php\n" .

125 "// created: " . date('Y-m-d H:i:s') . "\n";

126 }

blocks.php (https://bitbucket.org/benjamin_cassinat/meute-apax.git) PHP · 102 lines

74 <td>

75 <div style="width:100%;height:67px;padding-top:50px;vertical-align:text-bottom;background-color:#3bc1ff; text-align:center;">

76 <select name="block1"><?php echo verif($block1,$block1); ?><option value="0"><?php echo block_hide; ?></option><option value="1"><?php echo block_show; ?></option></select>

77 </div>

78 <div style="width:100%;height:96px;padding-top:60px;vertical-align:text-bottom;background-color:#8a00ff; text-align:center;">

79 <select name="block2"><?php echo verif($block2,$block2); ?><option value="0"><?php echo block_hide; ?></option><option value="1"><?php echo block_show; ?></option></select>

80 </div>

81 <div style="width:100%;height:65px;padding-top:60px;vertical-align:text-bottom;background-color:#18ff00; text-align:center;">

82 <select name="block3"><?php echo verif($block3,$block3); ?><option value="0"><?php echo block_hide; ?></option><option value="1"><?php echo block_show; ?></option></select>

83 </div><div style="width:100%;height:38px;padding-top:25px;vertical-align:text-bottom;background-color:#ff3000; text-align:center;">

84 <select name="block4"><?php echo verif($block4,$block4); ?><option value="0"><?php echo block_hide; ?></option><option value="1"><?php echo block_show; ?></option></select>

85 </div>

86 </td>

Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines

1 <?php

2 namespace W3TC;

3

117 @fputs( $fp, pack( 'L', $expires_at ) );

118 @fputs( $fp, '<?php exit; ?>' );

119 @fputs( $fp, @serialize( $var ) );

175

176 if ( $fp2 ) {

177 @fputs( $fp2, pack( 'L', time() + 30 ) );

178 @fclose( $fp2 );

179 }

240 @flock( $fp, LOCK_EX );

241

242 @fputs( $fp, pack( 'L', 0 ) ); // make it expired

243 @fclose( $fp );

244

409 @fputs( $fp, pack( 'L', $expires_at ) );

410 @fputs( $fp, '<?php exit; ?>' );

411 @fputs( $fp, (int)$value );

ddt.php (https://github.com/socialplanning/oc-js.git) PHP · 288 lines

1 <?php

2 /*

3 This ddt library is released under the terms of the HTMLArea license.

79 }

80

81 fputs( $fvDEBUG[ "logfile_fp" ], "$msgline" );

82 fflush( $fvDEBUG[ "logfile_fp" ] );

83

189 if (( $fp = fopen( $_DDT_ERROR_LOG, "a" )) != NULL )

190 {

191 fputs( $fp, date("D M j G:i:s T Y") . " - $file:$line: $msg\n" );

192 fclose( $fp );

193 }

AddressFilter.php (https://github.com/imr/horde.git) PHP · 108 lines

1 <?php

2 /**

3 * Test the address rewriting filter.

4 *

5 * PHP version 5

6 *

7 * @category Kolab

10 * @author Gunnar Wrobel <wrobel@pardus.de>

11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

12 * @link http://pear.horde.org/index.php?package=Kolab_Filter

13 */

14

26 * @author Gunnar Wrobel <wrobel@pardus.de>

27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

28 * @link http://pear.horde.org/index.php?package=Kolab_Filter

29 */

30 class Horde_Kolab_Filter_Unit_Helper_AddressFilterTest

Voicemail.php (https://github.com/testruby/Tine-2.0-Open-Source-Groupware-and-CRM.git) PHP · 167 lines

1 <?php

2 /**

3 * Asterisk_Voicemail controller for Voipmanager Management application

60

61 /**

62 * (non-PHPdoc)

63 * @see Tinebase/Controller/Record/Tinebase_Controller_Record_Abstract#create($_record)

64 */

75

76 /**

77 * (non-PHPdoc)

78 * @see Tinebase/Controller/Record/Tinebase_Controller_Record_Abstract#delete($_ids)

79 */

90

91 /**

92 * (non-PHPdoc)

93 * @see Tinebase/Controller/Record/Tinebase_Controller_Record_Abstract#update($_record)

94 */

2660.php (https://bitbucket.org/DinoRex99/exploit-database.git) PHP · 103 lines

1 #!/usr/bin/php

2 <?php

9 *

10 * Usage:

11 * php script.php [host] [path] [table prefix] [user id] [username] [password]

12 *

13 * Usage Example:

14 * php script.php domain.com /coppermine/ cpg149_ 1 john secret

15 *

16 * Googledork"

56

57 $post = "username=".urlencode($userl)."&password=".urlencode($passl)."&submitted=Login";

58 $req = "POST ".$path."login.php?referer=index.php HTTP/1.1\r\n";

59 $req .= "Referer: http://".$host.$path."login.php?referer=index.php\r\n";

fianet_socket.php (http://marocmall.googlecode.com/svn/trunk/) PHP · 173 lines

1 <?php

2

3

67 if (strlen($this->path."?".$data) > 2048)

68 {

69 fianet_insert_log("fianet_socket.php - build_header() <br />\nMaximum length in get method reached(".strlen($this->path."?".$data).") : <br />\n".$this->path."?".$data);

70 }

71 $header = "GET ".$this->path."?".$data." HTTP/1.1\r\n";

134 {

135 $data_reached = false;

136 if (@fputs($socket, $header.$data))

137 {

138 while (!feof($socket))

158 else

159 {

160 fianet_insert_log("fianet_socket.php - connect() <br />\nEnvoie des données impossible sur : <br />\n".$host);

161 $res = false;

162 }

closure.c (https://github.com/lexxmark/winflexbison.git) C · 235 lines

66 fprintf (stderr, " (rule %d)\n", item_number_as_rule_number (*rp));

67 }

68 fputs ("\n\n", stderr);

69 }

70

HTTPClient.php (https://github.com/engel/yase.git) PHP · 172 lines

1 <?php

2

3 class YASE_HTTPClient {

50

51 if($this->oSocket)

52 fputs( $this->oSocket, $sRequest."\r\n");

53 }

54

function.fetch.php (https://bitbucket.org/isaaczhang/dotproject.git) PHP · 217 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 * @param array

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

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

32 require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php');

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

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

148 } else {

149 if($_is_proxy) {

150 fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");

151 } else {

152 fputs($fp, "GET $uri HTTP/1.0\r\n");

PlainHTTPFetcher.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 251 lines

1 <?php

2

3 /**

5 * implementation.

6 *

7 * PHP versions 4 and 5

8 *

9 * LICENSE: See the COPYING file included in this distribution.

18 * Interface import

19 */

20 require_once "Auth/Yadis/HTTPFetcher.php";

21

22 /**

105 stream_set_timeout($sock, $this->timeout);

106

107 fputs($sock, implode("\r\n", $headers) . "\r\n\r\n");

108

109 $data = "";

Request.php (https://github.com/joannalz/YiiBlocks.git) PHP · 243 lines

1 <?php

2

3 /**

20

21 /**

22 * PHP's $_SERVER data

23 *

24 * @var string

47 * Sets up the object

48 *

49 * The serverData array can be used to override usage of PHP's

50 * global _SERVER variable.

51 *

183 $this->body = self::$defaultInputStream;

184 } else {

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

186 self::$defaultInputStream = $this->body;

187 }

rpc.php (https://github.com/nicolasconnault/moodle2.0.git) PHP · 111 lines

1 <?php

2 /**

3 * $Id: rpc.php,v 1.1 2008/05/12 03:10:33 scyrma Exp $

7 */

8

9 require_once("./includes/general.php");

10

11 // Set RPC response headers

35 if (!$raw) {

36 if (!function_exists('file_get_contents')) {

37 $fp = fopen("php://input", "r");

38 if ($fp) {

39 $raw = "";

45 }

46 } else

47 $raw = "" . file_get_contents("php://input");

48 }

49

file_variation.php (https://github.com/tstarling/hiphop-php.git) PHP · 61 lines

1 <?php

2 /*

3 * Prototype: array file ( string filename [,int use-include_path [,resource context]] );

42 foreach($out_array as $line) {

43 if( !strstr( $line, $key ) )

44 fputs($file_handle2,$line);

45 }

46 echo "File contents in array form After replacement of the key\n";

51 echo "\n--- Done ---";

52 ?>

53 <?php

54 $file_path = dirname(__FILE__);

55 unlink($file_path."/file_variation.tmp");

cloner.php (https://github.com/severnaya99/Sg-2010.git) PHP · 165 lines

1 <?php

2 // $Id$

3 // ------------------------------------------------------------------------ //

4 // XOOPS - PHP Content Management System //

5 // Copyright (c) 2000 XOOPS.org //

6 // <http://www.xoops.org/> //

42 $patValues = array_values($patterns);

43

44 // work around for PHP < 5.0.x

45 if(!function_exists('file_put_contents')) {

46 function file_put_contents($filename, $data, $file_append = false) {

50 return;

51 }

52 fputs($fp, $data);

53 fclose($fp);

54 }

function.fetch.php (https://github.com/raphaelbastide/berta.git) PHP · 217 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>

150 } else {

151 if($_is_proxy) {

152 fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");

153 } else {

154 fputs($fp, "GET $uri HTTP/1.0\r\n");

155 }

156 if(!empty($host)) {

157 fputs($fp, "Host: $host\r\n");

158 }

159 if(!empty($accept)) {

obj_print.c (https://github.com/Lafriks/mupdf.git) C · 340 lines

312 {

313 fz_sprint_obj(ctx, buf, sizeof buf, obj, tight);

314 fputs(buf, fp);

315 fputc('\n', fp);

316 }

319 ptr = fz_malloc(ctx, n + 1);

320 fz_sprint_obj(ctx, ptr, n + 1, obj, tight);

321 fputs(ptr, fp);

322 fputc('\n', fp);

323 fz_free(ctx, ptr);

ps_pagseguro.php (https://github.com/rafarubert/megafiltros.git) PHP · 85 lines

1 <?php

2 if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );

3

23 }

24 function trataInput($input) {

25 require_once(CLASSPATH ."payment/".$this->classname.".cfg.php");

26 if (!isset($input['type'])) $input['type'] = 'text';

27 $input['id'] = "{$this->classname}_{$input['name']}";

57 }

58 function configfile_writeable() {

59 return is_writeable( CLASSPATH."payment/".$this->classname.".cfg.php" );

60 }

61 function configfile_readable() {

62 return is_readable( CLASSPATH."payment/".$this->classname.".cfg.php" );

63 }

64

xnee_callback.c (git://pkgs.fedoraproject.org/Xnee) C · 125 lines

69 xnee_verbose ((xd, "Failed to set \"%s\" from plugin\n", sym_name));

70 *dest = saved ;

71 fputs(error, stderr);

72 return (XNEE_PLUGIN_FILE_ERROR);

73 }

113 xnee_verbose ((xd, "Failed to set \"%s\" from plugin\n", sym_name));

114 *dest = saved ;

115 fputs(error, stderr);

116 return (XNEE_PLUGIN_FILE_ERROR);

117 }

MboxMessageOldTest.php (https://github.com/devilsansclue/ZendFramework.git) PHP · 148 lines

1 <?php

2 /**

3 * Zend Framework

24 * Zend_Mail_Storage_Mbox

25 */

26 require_once 'Zend/Mail/Storage/Mbox.php';

27

28 /**

29 * Zend_Config

30 */

31 require_once 'Zend/Config.php';

32

33 /**

57 * @group Zend_Mail

58 */

59 class Zend_Mail_MboxMessageOldTest extends PHPUnit_Framework_TestCase

60 {

61 protected $_mboxOriginalFile;

function.fetch.php (https://github.com/GuessWho/don-t-enter.git) PHP · 216 lines

1 <?php

2 /**

3 * Smarty plugin

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

15 *

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

17 * (Smarty online manual)

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

149 } else {

150 if($_is_proxy) {

151 fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");

152 } else {

153 fputs($fp, "GET $uri HTTP/1.0\r\n");

154 }

155 if(!empty($host)) {

156 fputs($fp, "Host: $host\r\n");

157 }

158 if(!empty($accept)) {

LDIFWriter.class.php (https://github.com/treuter/xp-framework.git) PHP · 84 lines

1 <?php

2 /* This class is part of the XP framework

3 *

22 *

23 * $l= new LDAPClient($dsn->getHost(), $dsn->getPort(389));

24 * $writer= new LDIFWriter(new File('php://stdout'));

25 *

26 * try {

31 * $writer->write($l->read(new LDAPEntry($dn)));

32 * } catch(XPException $e) {

33 * fputs(STDERR, $e->getStackTrace());

34 * }

35 *

File.php (https://github.com/Arkadiy-Sedelnikov/joostina-1.4.git) PHP · 64 lines

1 <?php

2 /**

3 * @package Joostina

4 * @copyright ��������� ����� (C) 2008 Joostina team. ��� ����� ��������.

5 * @license �������� http://www.gnu.org/licenses/gpl-2.0.htm GNU/GPL, ��� help/license.php

6 * Joostina! - ��������� ����������� ����������� ���������������� �� �������� �������� GNU/GPL

7 * ��� ��������� ���������� � ������������ ����������� � ��������� �� ��������� �����, �������� ���� help/copyright.php.

8 * @version 3.1.0

9 * @package patTemplate

10 * @author Stephan Schmidt <schst@php.net>

11 * @license LGPL

12 * @link http://www.php-tools.net

48 }

49 flock($fp, LOCK_EX);

50 fputs($fp, serialize($templates));

51 flock($fp, LOCK_UN);

52 $filemode = $this->getParam('filemode');

stream.php (https://github.com/jamusj/iphone.git) PHP · 85 lines

1 <?php

2 /*

3 Copyright (c) 2009, Jamus Jegier

31 */

32

33 require_once 'streamlib.php';

34

35 $url=resolveMp3Stream($_GET["url"]);

61

62 $file=fsockopen($parsed_url["site"],$parsed_url["port"]);

63 fputs($file,"GET ".$parsed_url["loc"]." HTTP/1.0\n\n");

64

65 while (1)

Ftp.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 335 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

72 * @return true

73 * @throws LocalizedException

74 * @SuppressWarnings(PHPMD.CyclomaticComplexity)

75 * @SuppressWarnings(PHPMD.NPathComplexity)

158 * @param bool $recursive

159 * @return bool

160 * @SuppressWarnings(PHPMD.UnusedFormalParameter)

161 */

162 public function mkdir($dir, $mode = 0777, $recursive = true)

171 * @param bool $recursive

172 * @return bool

173 * @SuppressWarnings(PHPMD.UnusedFormalParameter)

174 */

175 public function rmdir($dir, $recursive = false)

Csv.php (https://bitbucket.org/dnejedly/eaparts.git) PHP · 142 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

49

50 $fp = tmpfile();

51 fputs($fp, $this->getData());

52 fseek($fp, 0);

53

utility.c (https://github.com/darkrock/ferite-modules.git) C · 427 lines

70 z.next_out = (unsigned char *)(*outData);

71

72 /* php/ext/zlib/zlib.c says that the following will compress without

73 * the zlib internal headers and that is good enough for me

74 */

108 *outData = 0;

109

110 /* from PHP, use multiple to expand our buffer until it is large enough*/

111 for (multiple = 2; multiple < 16; ++multiple) {

112 *outLength = inLength * (1 << multiple);

162 *outData = 0;

163

164 /* from PHP, use multiple to expand our buffer until it is large enough*/

165 for (multiple = 2; multiple < 16; ++multiple) {

166 *outLength = inLength * (1 << multiple);

ERunActionsHttpClient.php (https://github.com/teeaich/snapity.git) PHP · 153 lines

1 <?php

2

3 /**

4 * ERunActionsHttpClient.php

5 *

6 * A simple Http request client based on

7 * http://www.php.net/manual/de/function.fsockopen.php#101872

8 *

9 * Can send url requests without waiting for response

32 /**

33 * Socked based http request

34 * Based on code from: http://www.php.net/manual/de/function.fsockopen.php#101872

35 * Added touchOnly feature, changed headers

36 *

PlainHTTPFetcher.php (https://github.com/tanepiper/pastemonkey.git) PHP · 245 lines

1 <?php

2

3 /**

5 * implementation.

6 *

7 * PHP versions 4 and 5

8 *

9 * LICENSE: See the COPYING file included in this distribution.

18 * Interface import

19 */

20 require_once "Auth/Yadis/HTTPFetcher.php";

21

22 /**

68 }

69

70 $user_agent = "PHP Yadis Library Fetcher";

71

72 $headers = array(

Wstringop-overread-6.c (https://gitlab.com/adotout/gcc) C · 574 lines

17 typedef struct FILE FILE;

18

19 int fputs (const char*, FILE*);

20 int fputs_unlocked (const char*, FILE*);

534

535

536 void warn_fputs (FILE *f)

537 {

538 fputs (unterm, f); // { dg-warning "-Wstringop-overread" }

539 }

540

541 void warn_fputs_end (FILE *f)

542 {

543 const char *s = arr + sizeof arr;

544 fputs (s, f); // { dg-warning "-Wstringop-overread" }

545 }

546

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;

164 } else {

165 if ($_is_proxy) {

166 fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");

167 } else {

168 fputs($fp, "GET $uri HTTP/1.0\r\n");

deploy.php (https://bitbucket.org/figurluk/unit_prague_2018.git) PHP · 145 lines

1 <?php

2

3 namespace Deployer;

4

5 require 'recipe/common.php';

6 require 'recipe/laravel.php';

8 function updateProductSeeders($seeder)

9 {

10 $reading = fopen('database/seeds/production-seeds.php', 'r');

11 $writing = fopen('database/seeds/production-seeds.tmp', 'w');

12

16 $line = fgets($reading);

17 if (strpos($line, $seeder)) {

18 fputs($writing, $line);

19 fgets($reading);

20 $line = "\t\t'executed' => '" . date('d.m.Y H:i:s') . "',\n";

class.wsdlcache.php (https://github.com/Dimyan/muhovyaz_ps.git) PHP · 209 lines

1 <?php

2 /*

3 The NuSOAP project home is:

13 * @author Scott Nichol <snichol@users.sourceforge.net>

14 * @author Ingo Fischer <ingo@apollon.de>

15 * @version $Id: class.wsdlcache.php 6626 2011-05-24 09:44:48Z aFolletete $

16 * @access public

17 */

152 return false;

153 }

154 fputs($fp, $s);

155 fclose($fp);

156 $this->debug("Put $wsdl_instance->wsdl ($filename) in cache");

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');

51 } else {

52 // NO HTTP ERROR

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

54 while ( ! feof ( $fp ) ) {

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

symify.c (https://gitlab.com/OpenSourceMirror/rhide) C · 222 lines

159 }

160 else

161 fputs(line, ofile);

162 }

163 fclose(ifile);

Daemon.class.php (https://github.com/sseshachala/Open-Web-Analytics.git) PHP · 380 lines

1 <?php

2 /**

3 * @package binarychoice.system.unix

17 * Requirements:

18 * Unix like operating system

19 * PHP 4 >= 4.3.0 or PHP 5

20 * PHP compiled with:

241 else

242 {

243 fputs($fp, $this->_pid);

244 fclose($fp);

245 }

umod.c (https://bitbucket.org/vrrm/brl-cad-copy-for-fast-history-browsing-in-git.git) C · 200 lines

169 if( !get_args( argc, argv ) || isatty(fileno(stdin))

170 || isatty(fileno(stdout)) ) {

171 (void)fputs(usage, stderr);

172 exit( 1 );

173 }

testsuite.php (https://github.com/miamiruby/cakestuff.git) PHP · 192 lines

1 #!/usr/local/bin/php -n

2 <?php

3 /*

4 Whois.php PHP classes to conduct whois queries

5

6 Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic

10 For the most recent version of this package visit:

11

12 http://www.phpwhois.org

13

14 This program is free software; you can redistribute it and/or

63 // Test domains

64

65 include('whois.main.php');

66

67 $whois = new Whois();

cache.php (https://github.com/epsylon3/torrentflux.git) PHP · 202 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4: */

3 // +----------------------------------------------------------------------+

4 // | PHP version 4.0 |

5 // +----------------------------------------------------------------------+

6 // | Copyright (c) 2002 Active Fish Group |

9 // +----------------------------------------------------------------------+

10 //

11 // $Id: cache.php,v 1.4 2003/05/15 14:17:41 releasedj Exp $

12

13 /**

154 }

155 flock($f, 2); // set an EXclusive lock

156 fputs($f, $data); // write the parsed string from vlibTemplate

157 flock($f, 3); // UNlock file

158 fclose($f);

file.php (https://github.com/cesagonchu/shoutbox.git) PHP · 150 lines

1 <?php

2 /*

3 You may not change or alter any portion of this comment or credits

18 * @since 5.0

19 * @author trabis <lusopoemas@gmail.com>

20 * @version $Id: file.php 0 2010-01-06 18:47:04Z trabis $

21 */

22

119 $f = fopen($this->csvfile, 'w');

120 foreach ($shouts as $i => $line) {

121 fputs($f, $line);

122 }

123 fclose($f);

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

Class.Log.php (https://github.com/CircleCode/dynacase-core.git) PHP · 310 lines

1 <?php

2 /*

3 * @author Anakeen

9 *

10 * @author Anakeen

11 * @version $Id: Class.Log.php,v 1.15 2008/10/31 16:57:18 jerome Exp $

12 * @license http://www.gnu.org/licenses/lgpl-3.0.html GNU Lesser General Public License

13 * @package FDL

252 $xx = $xx . $str . "\n";

253 $fd = fopen($this->logfile, "a");

254 fputs($fd, $xx);

255 fclose($fd);

256 } else {

function.fetch.php (https://github.com/kiang/olc_baker.git) PHP · 222 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>

156 } else {

157 if ($_is_proxy) {

158 fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");

159 } else {

160 fputs($fp, "GET $uri HTTP/1.0\r\n");

161 }

162 if (!empty($host)) {

163 fputs($fp, "Host: $host\r\n");

164 }

165 if (!empty($accept)) {

run-tests.c (https://github.com/mmalecki/libuv.git) C · 172 lines

105 ASSERT(buffer == fgets(buffer, sizeof(buffer) - 1, stdin));

106 buffer[sizeof(buffer) - 1] = '\0';

107 fputs(buffer, stdout);

108 return 1;

109 }

cache.php (https://github.com/severnaya99/Sg-2010.git) PHP · 158 lines

1 <?php

2 //

3 // +----------------------------------------------------------------------+

6 // | Copyright (c) 2003 The zen-cart developers |

7 // | |

8 // | http://www.zen-cart.com/index.php |

9 // | |

10 // | Portions Copyright (c) 2003 osCommerce |

18 // | license@zen-cart.com so we can mail you a copy immediately. |

19 // +----------------------------------------------------------------------+

20 // $Id: cache.php 290 2004-09-15 19:48:26Z wilt $

21 //

22 /**

38 flock($fp, 2); // LOCK_EX

39 // write serialized data

40 fputs($fp, serialize($var));

41 // release the file lock

42 flock($fp, 3); // LOCK_UN

FL_File.cs (https://github.com/Wiladams/NewTOAPIA.git) C# · 468 lines

415

416 //-----------------------------------------------------------------------------

417 // fl_fputs: Write a character string to the stream

418 //-----------------------------------------------------------------------------

419 #if FATFS_INC_WRITE_SUPPORT

420 int fl_fputs(const char * str, void *f)

421 {

422 int len = (int)strlen(str);

string_utils.cpp (https://github.com/StormyDay/ags.git) C++ · 140 lines

9 // The AGS source code is provided under the Artistic License 2.0.

10 // A copy of this license can be found in the file License.txt and at

11 // http://www.opensource.org/licenses/artistic-license-2.0.php

12 //

13 //=============================================================================

112 //=============================================================================

113 // FIXME: remove later when arrays of chars are replaced by string class

114 void fputstring(const char *sss, Common::DataStream *out)

115 {

116 int b = 0;

atest-exp.c (https://github.com/attliaLin/Learn-SourceCode.git) C · 192 lines

53

54 value[size] = '\0';

55 fputs (value, stdout);

56 }

57

146 printf ("%06x ", i * (0x100000 / (1 << N2)));

147 print_mpn_hex (ex, (FRAC / 4) + 1);

148 fputs ("\n ",stdout);

149 print_mpn_hex (e2, (FRAC / 4) + 1);

150 printf ("\n %c ",

183 printf ("%d failures; %d errors; error rate %0.2f%%\n", failures, errors,

184 errors * 100.0 / (double) (1 << N2));

185 fputs ("maximum error: ", stdout);

186 print_mpn_hex (maxerror, (FRAC / 4) + 1);

187 fputs ("\nerror in exp(1): ", stdout);

MboxMessageOldTest.php (https://github.com/sidealice/zf2.git) PHP · 138 lines

1 <?php

2 /**

3 * Zend Framework

47 * @group Zend_Mail

48 */

49 class MboxMessageOldTest extends \PHPUnit_Framework_TestCase

50 {

51 protected $_mboxOriginalFile;

126 {

127 $fh = fopen($this->_mboxFile, 'w');

128 fputs($fh, "From \r\nSubject: test\r\nFrom \r\nSubject: test2\r\n");

129 fclose($fh);

130 $mail = new MboxOldMessage(array('filename' => $this->_mboxFile));

Varnish.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 178 lines

1 <?php

2

3 /**

38

39 /**

40 * PHP5-style constructor

41 */

42 function __construct() {

55 */

56 protected function _purge($url) {

57 w3_require_once(W3TC_INC_DIR . '/functions/http.php');

58

59 @set_time_limit($this->_timeout);

135 @stream_set_timeout($fp, 60);

136

137 @fputs($fp, $request);

138

139 $response = '';

Fetch.php (https://github.com/durand54/sitellite.git) PHP · 244 lines

1 <?php

2

3 /**

89 return false;

90 } else {

91 fputs ($f, sprintf ("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n", $r['path'] . '?' . $r['query'], $r['host'], $this->ua));

92 $data = '';

93 while (! feof ($f)) {

test_ext_network.cpp (https://github.com/tmjnaid/hiphop-php.git) C++ · 266 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |

6 +----------------------------------------------------------------------+

7 | This source file is subject to version 3.01 of the PHP license, |

8 | that is bundled with this package in the file LICENSE, and is |

9 | available through the world-wide-web at the following url: |

10 | http://www.php.net/license/3_01.txt |

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

12 | obtain it through the world-wide-web, please send a note to |

13 | license@php.net so we can mail you a copy immediately. |

14 +----------------------------------------------------------------------+

15 */

choreographie.php (https://github.com/mkweb/NabServ.git) PHP · 169 lines

1 <?php

2 namespace nabserv;

3

162

163 $fh = fopen($this->dirname . DS . $name . '.chor', 'w');

164 fputs($fh, $this);

165 fclose($fh);

166 }

release-tool.php (git://github.com/WindowsAzure/azure-sdk-for-php.git) PHP · 107 lines

1 #!/usr/bin/env php

2 <?php

13 * limitations under the License.

14 *

15 * PHP version 5

16 *

17 * @category Microsoft

18 *

19 * @author Azure PHP SDK <azurephpsdk@microsoft.com>

20 * @copyright Microsoft Corporation

21 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

28 *

29 * 1. change the NEW_VER const to the correct new version string

30 * 2. run php .\bin\release-tool.php in the root directory

31 */

32 const VER_TOKEN = ' * @version';

class.auth_pop3.inc (https://github.com/BlackNinjaDruid/eyATK.git) PHP · 135 lines

1 <?php

2 /**

3 * This file is part of the Achievo ATK distribution.

95 /* authenticate */

96 $void = fgets($link_id, 1000);

97 fputs($link_id, "USER ".$user."\r\n");

98 $void = fgets($link_id, 1000);

99 fputs($link_id, "PASS ".$passwd."\r\n");

100 $auth = fgets($link_id, 1000);

101 fputs($link_id, "QUIT\r\n");

102 fclose($link_id);

103

rotz-search.c (https://bitbucket.org/hroptatyr/rotz.git) C · 122 lines

63

64 /* just print the name and stats */

65 fputs(rotz_massage_name(k.d), stdout);

66 if (cp->show_numbers) {

67 /* get the number also */

92

93 if (argi->nargs < 1) {

94 fputs("Error: need a search string\n", stderr);

95 return 1;

96 }

97

98 if (UNLIKELY((ctx = make_rotz(db)) == NULL)) {

99 fputs("Error opening rotz datastore\n", stderr);

100 return 1;

101 }

LogToolPage.php (https://github.com/jstar88/LibreTitan.git) PHP · 112 lines

1 <?php

2

3 /**

12 define('XGP_ROOT', './../');

13

14 include(XGP_ROOT . 'global.php');

15

16 if ($user['authlevel'] < 1) die(message ($lang['404_page']));

17

18 $parse = $lang;

19 $Archive = "Log/".$_GET['file'].".php";

20

21 switch ($_GET['options'])

26 fclose($FP);

27

28 message($lang['log_delete_succes'].$_GET['file'], "LogToolPage.php?options=links&file=".$_GET['file']."", 2);

29 break;

30

Csv.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 142 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

49

50 $fp = tmpfile();

51 fputs($fp, $this->getData());

52 fseek($fp, 0);

53

Csv.php (https://github.com/rgranadino/magento-mirror.git) PHP · 142 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

49

50 $fp = tmpfile();

51 fputs($fp, $this->getData());

52 fseek($fp, 0);

53

ping_server.inc.php (http://lansuite.googlecode.com/svn/trunk/) PHP · 131 lines ✨ Summary

This PHP function ping_server checks if a server is reachable and retrieves additional information about it, such as its type (FTP or IRC), availability, and special info. It uses a socket connection to test reachability and sends commands to the server to gather more data. The results are then stored in a database.

1 <?php

2

3 function ping_server($host, $port) {

25 socket_set_timeout($fp, 1, 500);

26 //Benutzernamen senden

27 fputs ($fp, "USER anonymous\r\n");

28 //Passwort senden

29 fputs ($fp, "PASS erreichbarkeitstest@lansuite.de\r\n");

30 //In Pasivmode wechseln

31 fputs ($fp, "PASV\r\n");

32 //System abfragen

33 fputs ($fp, "SYST\r\n");

34 //Verzeichnis auflisten

35 fputs ($fp, "LIST\r\n");

36 //Quit senden

37 fputs ($fp, "QUIT\r\n");

misc_tools.php (https://github.com/floodyberry/carmack.git) PHP · 169 lines

71

72 foreach( $link_array as $idx => $link_info ) {

73 fputs( $fp, "$timestamp, $link_info[title] ($link_info[type]), $link_info[url]\n" );

74 }

75 }

166 $mon_full[ "12" ] = "December";

167

168 require_once( "conf.php" );

169 ?>

utils.php (https://github.com/gersh/raydash-php.git) PHP · 74 lines

1 <?php

2 function http_request(

3 $verb = 'GET', /* HTTP Request Method (GET and POST supported) */

61 stream_set_timeout($fp, 0, $timeout * 1000);

62

63 fputs($fp, $req);

64 while ($line = fgets($fp)) $ret .= $line;

65 fclose($fp);

file_manage_control.php (https://github.com/musicpop/cms.git) PHP · 163 lines

1 <?php

2 /**

3 * Îļþ¹ÜÀí¿ØÖÆ

4 *

5 * @version $Id: file_manage_control.php 1 8:48 2010��7��13��Z tianya $

6 * @package DedeCMS.Administrator

7 * @copyright Copyright (c) 2007 - 2010, DesDev, Inc.

9 * @link http://www.dedecms.com

10 */

11 require(dirname(__FILE__)."/config.php");

12 CheckPurview('plus_Îļþ¹ÜÀíÆ÷');

13 require(DEDEINC."/oxwindow.class.php");

14 require_once(DEDEADMIN.'/file_class.php');

15 $activepath = str_replace("..", "", $activepath);

16 $activepath = preg_replace("#^\/{1,}#", "/", $activepath);

function.fetch.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 220 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 * @param array

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

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

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

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

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

151 } else {

152 if($_is_proxy) {

153 fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");

154 } else {

155 fputs($fp, "GET $uri HTTP/1.0\r\n");

question_dialog_test.php (https://github.com/F5/zetacomponents.git) PHP · 279 lines

1 <?php

2 /**

3 * ezcConsoleQuestionDialogTest class.

29 * Require generic test case for ezcConsoleDialog implementations.

30 */

31 require_once dirname( __FILE__ ) . "/dialog_test.php";

32

33 /**

42 public static function suite()

43 {

44 return new PHPUnit_Framework_TestSuite( "ezcConsoleQuestionDialogTest" );

45 }

46

190 $res[] = $this->readPipe( $this->pipes[1] );

191

192 fputs( $this->pipes[0], "A\n" );

193 $res[] = $this->readPipe( $this->pipes[1] );

194

sfAtosPayementTask.class.php (https://github.com/cedriclombardot/sfAtosPaymentPlugin.git) PHP · 63 lines

1 <?php

2 /**

3 * @author Cédric Lombardot <cedric.lombardot@spyrit.net>

10 */

11

12 require_once sfConfig::get('sf_plugins_dir').'/sfAtosPaymentPlugin/lib/sfAtosPaymentConfig.class.php';

13

14 class sfAtosPaymentTask extends sfPluginBaseTask{

45

46 $debug=sfAtosPaymentConfig::get('debug',false);

47 fputs($fp,'DEBUG!'.(($debug)?'YES':'NO').'!

48 ');

49 fputs($fp,'D_LOGO!'.sfAtosPaymentConfig::get('d_logo','/sfAtosPaymentPlugin/logos/').'!

50 ');

51 fputs($fp,'F_CERTIFICATE!'.sfAtosPaymentConfig::get('f_certificate',$dir.'/certif').'!

52 ');

53 fputs($fp,'F_PARAM!'.sfAtosPaymentConfig::get('f_param',$dir.'/parcom').'!

IAHx.php (https://github.com/robertatakenaka/Biodiversidade.git) PHP · 127 lines

1 <?php

2

3 class IAHx

102 $fp = fsockopen($host, $port, $errno, $errstr, $timeout);

103

104 fputs( $fp, $ReqHeader );

105 if ($fp) {

106 while (!feof($fp)){

file_downloader.php (https://github.com/AJenbo/ubuntudanmark.dk.git) PHP · 120 lines

1 <?php

2 /**

3 *

4 * This file is part of the phpBB Forum Software package.

5 *

6 * @copyright (c) phpBB Limited <https://www.phpbb.com>

7 * @license GNU General Public License, version 2 (GPL-2.0)

8 *

12 */

13

14 namespace phpbb;

15

16 class file_downloader

34 * timeout, false if there were errors or the connection timed out

35 *

36 * @throws \phpbb\exception\runtime_exception If data can't be retrieved and no error

37 * message is returned

38 */

ChangeLog-9899 (https://bitbucket.org/freebsd/freebsd-head/) Unknown · 1670 lines

690 (fput_const): renamed as fput_hex_const

691 (print_insn_hppa):

692 - use the macros fputs_filtered and

693 fput_decimal_const whenever possible; calls to sign_extend require

694 2 params -- add a missing second param of 0.