Skip to content

Instantly share code, notes, and snippets.

@devpilot
Last active August 29, 2015 14:19
Show Gist options
  • Save devpilot/1a33e00fc381e578006d to your computer and use it in GitHub Desktop.
Save devpilot/1a33e00fc381e578006d to your computer and use it in GitHub Desktop.
Get details about PMPL package
<?php
/*
* Copy package options from below link to option.html
* http://203.147.88.14/24online/webpages/actualclientrenewal.jsp
*/
$data = file_get_contents("options.html");
// echo $data;
$pattrnA = "/VALUE =\"(.+)\"/";
preg_match_all($pattrnA, $data, $ids);
// print_r($ids);
foreach ($ids[1] as $id) {
$id = urlencode($id);
$url = 'http://203.147.88.14/24online/webpages/showcompletegroupdetail.jsp?groupid='.$id.'&mode=ren';
$html = file_get_contents($url);
$pattrnB = "/<font class=\"textfont\">(.*?)<\/font>/s";
preg_match_all($pattrnB, $html, $matches);
//print_r($matches[1]);
echo $id.";";
foreach ($matches[1] as $value) {
echo strip_tags(trim($value)).";";
//echo $value.";";
}
echo "\n";
// exit();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment