Created
          May 12, 2010 09:20 
        
      - 
      
- 
        Save sunny/398371 to your computer and use it in GitHub Desktop. 
    Apply the CSS styles to all the tags
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function inlinestyler($html) { | |
| return curl_post_data("http://inlinestyler.torchboxapps.com/styler/convert/", "returnraw=1&source=".urlencode($html)); | |
| } | |
| function curl_post_data($uri, $data) { | |
| $ch = curl_init($uri); | |
| curl_setopt($ch, CURLOPT_POST, 1); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
| curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | |
| curl_setopt($ch, CURLOPT_HEADER, 0); // do not return headers | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return the content of the call | |
| $exec = curl_exec($ch); | |
| curl_close($ch); | |
| return $exec; | |
| } | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment