- GoFuckBiz.info

  - GoFuckBiz.info > - > ,
, ,

24.02.2012, 01:43   #1
Strikelol
Senior Member
 
  Strikelol
 
: 31.03.2011
: 1,232
: $212700

PHP :
<?php
 
$file 
file('txtfile.txt');
$sitename "http://mainpage.com";
 
function 
when_find($matches)
  {
    return 
$matches[1].($matches[2]+1);
  }
preg_replace_callback(
    
$file,
    
"when_find",
    
$sitename);
 
?>
. . txtfile.txt ( ) - $sitename. -, , , :
Warning: preg_replace_callback() [function.preg-replace-callback]: Delimiter must not be alphanumeric or backslash in \home\name.ru\www\index.php on line 13
__________________
4 ,
AzartCash.com -
Strikelol   
24.02.2012, 02:10   #2
oso
 
  oso
 
: 21.01.2008
: 227
: $35485

, txtfile.txt
txtfile.txt , . , ? ?
__________________
php $20 $200 : 2012-2011, 2010, 2009.
oso   
24.02.2012, 02:15   #3
chesser
 
  chesser
 
: 05.07.2009
: chesser.ru
: 2,340
: $311120

Offtopic

__________________
| vps | | | |
chesser   
24.02.2012, 02:16   #4
Strikelol
Senior Member
 
  Strikelol
 
: 31.03.2011
: 1,232
: $212700

txtfile.txt. txtfile.txt , , > $sitename

:
chesser
Offtopic

, . .. )))
__________________
4 ,
AzartCash.com -
Strikelol   
24.02.2012, 02:21   #5
oso
 
  oso
 
: 21.01.2008
: 227
: $35485

PHP :
<?php
$replace_file 
'txtfile.txt';
$sitename     '123';

$replace = array();
foreach (
file($replace_file) as $v)
{
    
$v trim($v);
    if (empty(
$v)) {continue;}

    
$replace[] = $v;
}


foreach (
glob('*.txt') as $file
{
    if (
$file==$replace_file) {continue;}
    
    
$content file_get_contents($file);
    
$content str_replace($replace,$sitename,$content);
    
file_put_contents($file,$content);
}
__________________
php $20 $200 : 2012-2011, 2010, 2009.
oso   
24.02.2012, 02:23   #6
Strikelol
Senior Member
 
  Strikelol
 
: 31.03.2011
: 1,232
: $212700

, .
__________________
4 ,
AzartCash.com -
Strikelol   


© GoFuckBiz.info
Ad Management by RedTyger