This is level 46 website
| Name: |
Zhao Yang |
| School: |
Changchun University of Traditional Chinese Medicine |
| Exam Category: |
English level Four |
| Ticket Number: |
220090132112529 |
| Test time: |
December 2013 |
| Score: |
0 hearing:000 reads:000 writing and translation:000 |
This is my code.
$a = curl_exec ($ch); $match = "# (. *) #";//$match = "#(. *)#";p reg_match_all ($match, $a, $b); $yourname = $b [1][0];$ School= $b [1][1]; $cet = $b ["]; $c = $b [1][5];//score $score=strip_tags ($c); $score =str_replace (" "," ", $score); Return Array (' school ' = $school, ' name ' = = $yourname, ' cet ' + $cet, ' score ' = $score);
All the rest can get to the total score where they can't get it.
Reply to discussion (solution)
$a =<<< TXT
| name: /th> |
Zhao Yang |
| School: |
Changchun University of Traditional Chinese medicine |
tr>
| Exam Category: |
English level four |
| Ticket Number: |
220 090132112529 |
| exam time: |
December 2013 |
| score: |
0 hearing: read: Writing and translation: |
TXT; $match = "#
(.*?)
#is ";p reg_match_all ($match, $a, $b); $b [1][11] = preg_replace ('/\s/', '", Strip_tags ($b [1][11]));p Rint_r ($b [1]);
Array
(
[0] = + Name:
[1] = Zhao Yang
[2] = = School:
[3] = Changchun University of Traditional Chinese Medicine
[4] = Test Category:
[5] = English level Four
[6] = = Ticket No.:
[7] = 220090132112529
[8] = Test time:
[9] = December 2013
[Ten] = Total score:
[One] + 0 hearing: 000 reading: 000 Writing and translating: 000
)
$a =<<< TXT
| name: /th> |
Zhao Yang |
| School: |
Changchun University of Traditional Chinese medicine |
tr>
| Exam Category: |
English level four |
| Ticket Number: |
220 090132112529 |
| exam time: |
December 2013 |
| score: |
0 hearing: read: Writing and translation: |
TXT; $match = "#
(.*?)
#is ";p reg_match_all ($match, $a, $b); $b [1][11] = preg_replace ('/\s/', '", Strip_tags ($b [1][11]));p Rint_r ($b [1]);
Array
(
[0] = + Name:
[1] = Zhao Yang
[2] = = School:
[3] = Changchun University of Traditional Chinese Medicine
[4] = Test Category:
[5] = English level Four
[6] = = Ticket No.:
[7] = 220090132112529
[8] = Test time:
[9] = December 2013
[Ten] = Total score:
[One] + 0 hearing: 000 reading: 000 Writing and translating: 000
)
But the contents of $ A should be changed.
The content is changed and the format is fixed
Otherwise, it doesn't matter "collection."
The content is changed and the format is fixed
Otherwise, it doesn't matter "collection."
Now there's a problem. Last line?> error
I'm taking you this
$match = "# (.*?) #is ";
Escaped or an error.