Dears
This is an electricity billing Site link http://www.mepco.com.pk/ls/defftree.asp
I click on each link and SELECT and COPY/PASTE , It takes 3 hours minimum each day to save all pages in Excel.
I want to get all pages automatically using PHP or Query.
Because higher management demand reports each day.
Recommended Answers
Jump to Postyou need to learn curl.
Jump to PostI will write steps to follow for completing the job. You may have to learn certain things before starting from manauls and tutorials
1) You must have substation database with id and name at your server where u are going to write a script
2) write a script fetch …
Jump to Postyou need to enable php_curl.dll extention
Jump to PostWITHOUT CURL
$handle = fopen("http://www.mepco.com.pk/ls/ConsumerLoadShedding.asp?SDiv=5124&off=Shah Rukn-e-Alam Sub Division", "rb"); $contents = stream_get_contents($handle); fclose($handle); echo $contents;
or WITH CURL
$ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, "http://www.mepco.com.pk/ls/ConsumerLoadShedding.asp?SDiv=5124&off=Shah Rukn-e-Alam Sub Division"); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); …
All 15 Replies
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
commented:
Great post
+1
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
musthafa.aj
commented:
useful post
+1
urtrivedi
276
Nearly a Posting Virtuoso
chrishea
182
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.