jason06's avatar

Bill Fetching Website

Hey There!

I want to create a website that will fetch data from other websites' databases and display it on my website. When a user visits my website and enters their unique reference number to check their electricity bills according to their reference number, my website scrapes data from the original website and shows it on my website. Due to my lack of experience with Laravel, I do not know how to do that. This same scenario has been implemented in PHP using cURL, but I'm not sure how it will be implemented in Laravel.

If there is anyone who can assist me in completing this task, please let me know.

Thanks!

0 likes
16 replies
Sinnbeck's avatar

Why does it need to scrape the data? Don't you run the second website and isn't there an api?

jason06's avatar

@Tray2 Why my project dubious to you? Are there any problems with my question or do I violate the forum's rules?

Tray2's avatar

@jason06 Because it might just violate a whole bunch of contracted rules that the company you are mining the data from, and it might also be illegal,

jason06's avatar

@Tray2 Oh come on dude! It's just a simple final year project task.

Tray2's avatar

@jason06 I don't think the company whose data you are using will care. Without a written permission from them, you might be heading up shit creek, and no one here will want to be in any way involved in such.

jlrdw's avatar

What about utility customers who does not want their data on your site. Many are happy I'm sure logging in directly to the utility company.

jason06's avatar

@jlrdw A user wants a simple, clean user interface that the original website does not have, so this idea clicked in our heads to solve the user's problem of bad UI and help them get their electricity bills without hesitation.

In addition, there is another website that does the same thing, but with another electricity company

Snapey's avatar

This same scenario has been implemented in PHP using cURL, but I'm not sure how it will be implemented in Laravel.

pretty much the same

I hope you are holding users credentials encrypted?

Its not a service I would personally use since i would not share one sites password with another, but that's just me. Maybe your customers are more naive

zahid0046's avatar

Thats true here many websites using the same things some are using iframe like this and some are using scrapping techniques and also you can use api from website to use it the one which is using iframe for Sepco online bill is

Snapey's avatar

@zahid0046 API exists for a reason. They are created so that consumers can be assured that the API will be stable at a specific version. Scrape pages and you are on your own. Wake up one day to a stream of annoyed customers because the target website changed the layout and basically you are on your own and your service is broken until you can reverse engineer the new layout.

oliviacrter's avatar

If you’re planning to fetch electricity bill data by reference number, one important thing to keep in mind is legal access. Scraping data directly from official utility websites without permission can violate their terms. A safer and more practical approach is to build a helper platform that guides users to check their bills online using publicly accessible methods, without storing or scraping private data. For example, I’ve seen similar implementations where users simply enter their reference number and the system redirects or helps them retrieve bill details in a user-friendly way. One such implementation is available here: fescoebillcheck.pk. From a Laravel perspective, you can: Use Laravel HTTP client (Guzzle) instead of raw cURL Validate and sanitize reference numbers Avoid storing sensitive customer data Focus on UX, caching, and performance rather than scraping databases This approach keeps things scalable, legal, and much easier to maintain in Laravel.

Please or to participate in this conversation.