Hi, I got the below string value from $data
How do I extract the "generated" and "filename" value by using preg_match?
I'm weak at the regular expressions part... :-)
Thank you.
Code:
HTTP/1.1 200 OK X-Powered-By: PHP/5.3.6 Content-type: application/json Content-Length: 277 Date: Wed, 31 Aug 2011 09:39:18 GMT Server: lighttpd/2.0.0 {"links":[{"source":"http:\/\/www.filehost.com\/file\/abcdef","generated":"http:\/\/server10.fileserver.com\/files\/abcdef\/file.avi","filename":"file.avi","status":"OK","error":null,"time":0.174665}]}
How do I extract the "generated" and "filename" value by using preg_match?
I'm weak at the regular expressions part... :-)
Thank you.
PHP Code:
$generated = preg_match('', $data, $matches);
$filename = preg_match('', $data, $matches);
Comment