forked from rpitv/rpits
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathim_test.php
41 lines (26 loc) · 824 Bytes
/
im_test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<pre>
<?php
// This file is just for checking that functions / ideas work independently
//include("include.php");
//include("imagick_include.php");
//$result = stripDBFetch(dbFetchAll(5,"AwayTeamName"));
// print_r($result);
$page = fopen("tabular_data.txt","r");
$contents = stream_get_contents($page);
$result = parser($contents);
foreach($result as $img)
{
echo "<img src=\"http://rpiathletics.com/" . $img . "\" />$img<br>";
}
function parser($data)
{
preg_match_all("/image_path=(.*jpg)/i",$data,$data2);
foreach($data2[1] as $line)
{
$num = preg_match_all("/\/\/([A-Za-z]*)_/",$line,$vals);
print_r($vals);
}
return $data2[1];
}
?>
/common/controls/image_handler.aspx?image_path=/images/2012/8/30//KyleMcGovern_23.jpg&thumb_prefix=rp_roster