Linked Questions

0 votes
1 answer
941 views

i need to find a line and change it to whatever user will type in input i didnt write this code pls help <?php $myfile = 'test.txt'; $lines = file($myFile, FILE_IGNORE_NEW_LINES); $lines[4] = $...
R.A's user avatar
  • 71
-3 votes
1 answer
111 views

I have a string that comes from an android application. I also have a file (unknown.txt) which contains a line "20,30,40,2,5,?". I want to write a PHP script which is called by the android ...
Rohit Seshadri's user avatar
2 votes
1 answer
2k views

I have two websites. I would like to curl to a page on website #1 to retrieve html code which has links to my favorite twitch streams, embed in to my page using their api. Using this curl output, ...
Miguel Guerrero's user avatar
1 vote
4 answers
2k views

I have some 1000 html pages. I need to update the names which is present at the footer of every html page. What is the best possible efficient way of updating these html pages instead of editing each ...
Aakash Deep's user avatar
3 votes
3 answers
639 views

Ok so I want to do something similar to how Simple Machine Forum edits some variable within the Admin panel on the forum. For instance I have a settings.php file. I want tool.php to open and find all ...
Bart's user avatar
  • 107
0 votes
1 answer
438 views

my question is similiar like this : Replace string in text file using PHP but i want replace by spesification variable for example, i have already file exist .env variable_1=data_2021 variable_99=...
yogithesymbian's user avatar
0 votes
2 answers
145 views

I have a file like some.txt having content : #start-first Line 1 Line 2 Line 3 #end-first #start-second Line 1 Line 2 Line 3 Line 4 #end-second #start-n Line 1 Line 2 Line 3 Line 4 ... ... #end-n I ...
helpdoc's user avatar
  • 1,990
1 vote
2 answers
230 views

Let's consider we got following format text file with a size around 1Gb: ... li1 li2 li3 ... My task is to update line li2 to line2. Following will not work: $fd = fopen("file", 'c+'); // .. // ...
deividaspetraitis's user avatar
-1 votes
1 answer
153 views

i have a txt file containing 20 lines i want to replace line # 4 with a new text from an input ...i have tried this and some others but not solving my problem. PHP Code <?php if(isset($_POST['...
Khan's user avatar
  • 43
0 votes
1 answer
84 views

I need a help with replacing a word from a text file to a link using php This is my code: <?php $search = 'google'; $lines = file('f.txt'); foreach($lines as $line) { if(strpos($line, $search) ...
M.Fooz's user avatar
  • 11
0 votes
0 answers
52 views

I am making a wordpress plugin, you can edit a page's title with it. The title will be an H1 Tag with the ID of featuredTitle. <h1 id="featuredTitle">This text will be replaced!</h1&...
IdioticDev's user avatar