I ve downloaded css file in my localhost using html dom parser and ajax post..
<?php
require'simple_html_dom.php';
$srcCode = $_POST['doc'];
$url=$_POST['Url'];
$url_path=$url;
$html = file_get_html('template/'.$name.'.html');
if(!file_exists('template/css'))
{mkdir('template/css',0777, true);}
foreach($html->find('link') as $link)
{
$linkpath=$link->href;
$links = explode("/", $linkpath);
$linkName = end($links);
file_put_contents('/template/css/'.$linkName,file_get_contents($url_path.$linkpath));
}
?>
Now i ve to read those css file using php..or say i ve to get(dwnload) all the images src of those css..
background: url(../images/interface.png) no-repeat -1px -680px;
border: 0 none;
color: #534a39;
font-size: 16px;
height: 52px;
line-height: 42px;
margin: 24px auto 25px;
width: 281px;
text-indent: 40px;
how to parse css element?? how to get css content?? please do help me...