How to Check Your FESCO Bill Online

John - Sep 23 - - Dev Community

Faisalabad Electric Supply Company (FESCO) provides a convenient way for customers to check their electricity bills online. This saves time and effort compared to traditional methods. In this post, we’ll guide you through the steps to check your FESCO bill and provide a simple tool that you can use right here!

Why Check Your FESCO Bill Online?
Convenience: Access your bill anytime, anywhere.
Time-Saving: No need to visit offices or wait in long lines.
Immediate Updates: Get the latest bill information quickly.
Steps to Check Your FESCO Bill
To check your FESCO bill online, follow these steps:

Gather Your Reference Number: This is typically found on your previous bill.
Visit the FESCO Website: You can directly access their bill checking portal.
Enter Your Details: Input your reference number to view your current bill amount and due date.
Embedded Tool for Checking FESCO Bills
We’ve created a simple tool below to help you check your FESCO bill directly on this page. Just enter your reference number and click the "Check Bill" button!

php
Copy code
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $referenceNumber = $_POST['reference_number'];

    $url = "https://www.fesco.com.pk/billcheck.php?ref=" . urlencode($referenceNumber);

    $response = @file_get_contents($url);

    if ($response !== FALSE) {
        preg_match('/Bill Amount: \s*([\d,]+)/', $response, $matches);

        if (isset($matches[1])) {
            $billAmount = $matches[1];
            echo "Your bill amount is: " . htmlspecialchars($billAmount);
        } else {
            echo "Could not find the bill amount. Please check the reference number.";
        }
    } else {
        echo "Failed to fetch data from FESCO. Please try again later.";
    }
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FESCO Bill Checker</title>
</head>
<body>
    <h1>FESCO Bill Checker</h1>
    <form method="post">
        <label for="reference_number">Reference Number:</label>
        <input type="text" id="reference_number" name="reference_number" required>
        <button type="submit">Check Bill</button>
    </form>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Instructions to Use the Tool
Copy the PHP code above into a file named fesco_bill_checker.php.
Set up a local server using XAMPP or MAMP.
Place the file in your server’s root directory (e.g., htdocs for XAMPP).
Access it through your browser at http://localhost/fesco_bill_checker.php.
Enter your reference number and hit "Check Bill".
Conclusion
Checking your FESCO bill online is an easy and efficient process. With the tool provided above, you can quickly find out how much you owe. Remember to keep your reference number handy for the best experience.

.
Terabox Video Player