Skip to content

Commit a4a04ab

Browse files
enhancement(lint): Fix lint errors for public/php/curl.php
Co-authored-by: NeonGamerBot-QK <[email protected]> Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
1 parent 4488706 commit a4a04ab

File tree

1 file changed

+42
-25
lines changed

1 file changed

+42
-25
lines changed

public/php/curl.php

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
1-
<?php
2-
3-
// Set headers to allow streaming
4-
header('Content-Type: text/plain');
5-
header('Cache-Control: no-cache'); // Disable caching
6-
header('Connection: keep-alive');
7-
8-
$content = array("========================================\n", "Hi welcome to my site?! or curled version\n", "My name is Saahil Dutta and i am from the USA\n", "I am a " . 13 - (2027 - date("Y")) . "th grader in KCD.\n", "Apart from coding, some other activities that I love to do!\n", "Playing Games, ", " Eating different types of food,", " Robotics.\n", "I started programming during the Covid Pandemic in 2020\n", "I am fluent in new like programming languages such as CSS , HTML, Javascript and Typescript.\n", "My field of Interest's are building new Web Technologies and Products and also in areas related to", "Backend Services, CLI Services.\n", "Whenever possible, I also apply my passion for developing products with", "Node.js and Modern Javascript Library and Frameworks like React.js\n", "You can find the signature for this message in saahild.com/sig.txt", "\n========================================");
9-
// Turn off PHP output buffering
10-
while (ob_get_level()) {
11-
ob_end_clean();
12-
}
13-
ob_implicit_flush(true);
14-
15-
// Simulate a long-running process
16-
foreach ($content as $x) {
17-
echo $x;
18-
flush(); // Send output to the browser immediately
19-
sleep(1); // Simulate time-consuming task
20-
}
21-
echo "\n";
22-
sleep(2);
23-
echo "\n";
24-
//echo "Process complete!\n";
25-
?>
1+
<?php
2+
3+
// Set headers to allow streaming
4+
header("Content-Type: text/plain");
5+
header("Cache-Control: no-cache"); // Disable caching
6+
header("Connection: keep-alive");
7+
8+
$content = [
9+
"========================================\n",
10+
"Hi welcome to my site?! or curled version\n",
11+
"My name is Saahil Dutta and i am from the USA\n",
12+
"I am a " . 13 - (2027 - date("Y")) . "th grader in KCD.\n",
13+
"Apart from coding, some other activities that I love to do!\n",
14+
"Playing Games, ",
15+
" Eating different types of food,",
16+
" Robotics.\n",
17+
"I started programming during the Covid Pandemic in 2020\n",
18+
"I am fluent in new like programming languages such as CSS , HTML, Javascript and Typescript.\n",
19+
"My field of Interest's are building new Web Technologies and Products and also in areas related to",
20+
"Backend Services, CLI Services.\n",
21+
"Whenever possible, I also apply my passion for developing products with",
22+
"Node.js and Modern Javascript Library and Frameworks like React.js\n",
23+
"You can find the signature for this message in saahild.com/sig.txt",
24+
"\n========================================",
25+
];
26+
// Turn off PHP output buffering
27+
while (ob_get_level()) {
28+
ob_end_clean();
29+
}
30+
ob_implicit_flush(true);
31+
32+
// Simulate a long-running process
33+
foreach ($content as $x) {
34+
echo $x;
35+
flush(); // Send output to the browser immediately
36+
sleep(1); // Simulate time-consuming task
37+
}
38+
echo "\n";
39+
sleep(2);
40+
echo "\n";
41+
//echo "Process complete!\n";
42+
?>

0 commit comments

Comments
 (0)