02-23-2009, 11:35 AM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Nov 2007
Location: Edinburgh
Posts: 21
Thanks: 1
|
preg_match problem.
PHP Code:
<?php
$domain = "http://twitter.com/paulor";
$ch = curl_init() or die(curl_error()); curl_setopt($ch, CURLOPT_URL,$domain); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data1=curl_exec($ch) or die(curl_error()); echo curl_error($ch); curl_close($ch);
$regex = '/<span id="following_count" class="stats_count numeric">(.+?)</span>"/'; preg_match($regex,$data1,$match); echo $match[1];
?>
Getting this error:
Quote:
|
Warning: preg_match() [function.preg-match]: Unknown modifier 'p' on line 15
|
line 15 is the regex btw
anyone know whats wrong?
|
|
|
|