<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: fandelost</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>Cross-browser example of AJAX/XMLHttpRequest</title>
        <link>http://www.posteet.com/view/1012</link>
        <description>
        <![CDATA[<pre>function ajax(url, vars, callbackFunction) { var request = new XMLHttpRequest(); request.open(&quot;POST&quot;, url, true); request.setRequestHeader(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;); request.onreadystatechange = function() { if (request.readyState == 4 &amp;&amp; request.status == 200) { if (request.responseText) { callbackFunction(request.responseText); } } }; request.send(vars); }</pre> <a href="http://www.posteet.com/tags/ajax">[ajax]</a>  <a href="http://www.posteet.com/tags/xmlhttprequest">[xmlhttprequest]</a> ]]>        </description>
        <dc:creator>fandelost</dc:creator>
        <pubDate>Tue, 17 Jun 2008 13:18:05 +0000</pubDate>

            <category>ajax</category>
            <category>xmlhttprequest</category>
    
    </item>

  
    <item>
        <title>cPanel Remote Bandwidth Script</title>
        <link>http://www.posteet.com/view/1011</link>
        <description>
        <![CDATA[<pre>&lt;?php 
class cpanel 
{ 
    /**  
    * @var        resource        contains curl resource for communication with cpanel  
    **/ 
    var $socket ; 
    /** 
    * @param    string            username          your cpanel username 
    * @param    string            password          your cpanel password 
    * @param    string            hostname          your cpanel hostname 
    * @param    bool            ssl                  indicate ssl availability 
    * @param    string            theme              indicate the theme being used 
    * @return    void 
    * 
    * This will give you the default settings of using ssl and X as the theme 
    * &lt;code&gt;&lt;?php $cpanel = new cpanel( 'username', 'password', 'hostname' ); ?&gt;&lt;/code&gt; 
    *  
    * This will allow you to disable SSL 
    * &lt;code&gt;&lt;?php $cpanel = new cpanel( 'username', 'password', 'hostname', false ); ?&gt;&lt;/code&gt; 
    *  
    * This will allow you to disable SSL and change the theme 
    * &lt;code&gt;&lt;?php $cpanel = new cpanel( 'username', 'password', 'hostname', false, 'mytheme' ); ?&gt;&lt;/code&gt; 
    **/ 
    function cpanel( $username, $password, $hostname, $ssl = true, $theme = 'x' ) 
    { 
        $this-&gt;ssl = $ssl ; 
        $this-&gt;username = $username ; 
        $this-&gt;password = $password ; 
        $this-&gt;hostname = $hostname ; 
        $this-&gt;request = $request ; 
        $this-&gt;theme = $theme ; 
         
        if( !( $this-&gt;socket = @curl_init( ) ) ): die('FATAL : Cannot initialize curl'); 
            return; 
        else:     
            if( $this-&gt;ssl ): 
                curl_setopt( $this-&gt;socket, CURLOPT_SSL_VERIFYPEER, 0 );                 
                curl_setopt( $this-&gt;socket, CURLOPT_SSL_VERIFYHOST, 0 ); 
            endif; 
             
            curl_setopt( $this-&gt;socket, CURLOPT_FOLLOWLOCATION, 1 ); 
            curl_setopt( $this-&gt;socket, CURLOPT_HEADER, 0 ); 
            curl_setopt( $this-&gt;socket, CURLOPT_RETURNTRANSFER, 1 ); 
            curl_setopt( $this-&gt;socket, CURLOPT_HTTPHEADER,  
            array( sprintf( &quot;Authorization: Basic %s&quot;, base64_encode( sprintf( '%s:%s', $this-&gt;username, $this-&gt;password ) ) ) ) 
            ); 
        endif;     
         
        if( ereg( 'Login Attempt Failed', $this-&gt;make_request( sprintf( '/frontend/%s/', $this-&gt;theme ) ) ) ) 
            die(&quot;Cannot login to cpanel&quot;); 
    } 
    /** 
    * @param    string            request            the page to retrieve from cpanel 
    * @return    string            returns raw data 
    * 
    * This would retrieve the index page from cpanel 
    * &lt;code&gt;&lt;?php $cpanel-&gt;make_request( &quot;/frontend/$cpanel-&gt;theme&quot; ); ?&gt; 
    **/ 
    function make_request( $request ) 
    { 
        if( $this-&gt;ssl ) 
            curl_setopt( $this-&gt;socket, CURLOPT_URL, sprintf( &quot;https://%s:2083%s&quot;,$this-&gt;hostname,  $request ) ); 
        else 
            curl_setopt( $this-&gt;socket, CURLOPT_URL, sprintf( &quot;http://%s:2082%s&quot;,$this-&gt;hostname,  $request ) ); 
         
        return curl_exec( $this-&gt;socket ); 
    } 
    /** 
    * @return    string            returns html tables of table from cpanel index 
    * 
    * This example method returns all your account information from cpanel index, unformatted 
    * &lt;code&gt;&lt;?php echo $cpanel-&gt;account_tables( ); ?&gt;&lt;/code&gt; 
    **/ 
    function account_tables( ) 
    { 
        preg_match_all( '#(&lt;table width=&quot;275&quot; border=&quot;0&quot; cellspacing=&quot;3&quot; cellpadding=&quot;4&quot;&gt;.*?[^&lt;]&lt;/table&gt;)#si',  
                        $this-&gt;make_request( sprintf( &quot;/frontend/%s/&quot;, $this-&gt;theme ) ),  
                        $return  
        ); 
        return implode( &quot;&lt;br /&gt;&quot;, $return[0] ); 
    } 
    /** 
    * This method closes the curl resource 
    * 
    * &lt;code&gt;&lt;?php $cpanel-&gt;_close( ); ?&gt;&lt;/code&gt; 
    **/     
    function _close( ) 
    { 
        return @curl_close( $this-&gt;socket ); 
    } 
} 
$cpanel = new cpanel( &quot;username&quot;, &quot;password&quot;, &quot;hostname&quot; ); 

echo $cpanel-&gt;account_tables( ); 

$cpanel-&gt;_close( ); 
?&gt;</pre> <a href="http://www.posteet.com/tags/bandwith">[bandwith]</a>  <a href="http://www.posteet.com/tags/cpanel">[cpanel]</a>  <a href="http://www.posteet.com/tags/curl">[curl]</a> ]]>        </description>
        <dc:creator>fandelost</dc:creator>
        <pubDate>Tue, 17 Jun 2008 12:35:50 +0000</pubDate>

            <category>bandwith</category>
            <category>cpanel</category>
            <category>curl</category>
    
    </item>

  
    <item>
        <title>Serialize form values to use with Prototype.js AJAX model</title>
        <link>http://www.posteet.com/view/1000</link>
        <description>
        <![CDATA[<pre>var pars = Form.serialize($('form'));</pre> <a href="http://www.posteet.com/tags/forms">[forms]</a>  <a href="http://www.posteet.com/tags/prototype">[prototype]</a> ]]>        </description>
        <dc:creator>fandelost</dc:creator>
        <pubDate>Fri, 06 Jun 2008 13:33:53 +0000</pubDate>

            <category>forms</category>
            <category>prototype</category>
    
    </item>

  
    <item>
        <title>Easiest cross-browser CSS min-height</title>
        <link>http://www.posteet.com/view/850</link>
        <description>
        <![CDATA[<pre>.foo {
min-height:100px;
height: auto !important;
height: 100px;
}</pre> <a href="http://www.posteet.com/tags/css">[css]</a>  <a href="http://www.posteet.com/tags/height">[height]</a>  <a href="http://www.posteet.com/tags/layout">[layout]</a> ]]>        </description>
        <dc:creator>fandelost</dc:creator>
        <pubDate>Wed, 26 Mar 2008 16:03:58 +0000</pubDate>

            <category>css</category>
            <category>height</category>
            <category>layout</category>
    
    </item>

  
    <item>
        <title>Fixing Deezer Greyed Out Songs</title>
        <link>http://www.posteet.com/view/796</link>
        <description>
        <![CDATA[<pre>javascript:document.cookie = &quot;COUNTRY = FR&quot;;location.reload(true);</pre> <a href="http://www.posteet.com/tags/deezer fix mp3 music">[deezer fix mp3 music]</a> ]]>        </description>
        <dc:creator>fandelost</dc:creator>
        <pubDate>Wed, 27 Feb 2008 12:20:35 +0000</pubDate>

            <category>deezer fix mp3 music</category>
    
    </item>

  
    <item>
        <title>Embedding YouTube Videos as Valid XHTML 1.0</title>
        <link>http://www.posteet.com/view/774</link>
        <description>
        <![CDATA[<pre>&lt;object type=&quot;application/x-shockwave-flash&quot; style=&quot;width:425px; height:350px&quot; data=&quot;http://www.youtube.com/v/ulakMBcqyPo&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/ulakMBcqyPo&quot; /&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&gt;&lt;/object&gt;</pre> <a href="http://www.posteet.com/tags/embedd">[embedd]</a>  <a href="http://www.posteet.com/tags/flv">[flv]</a>  <a href="http://www.posteet.com/tags/valid">[valid]</a>  <a href="http://www.posteet.com/tags/video">[video]</a>  <a href="http://www.posteet.com/tags/w3c">[w3c]</a>  <a href="http://www.posteet.com/tags/xhtml">[xhtml]</a>  <a href="http://www.posteet.com/tags/youtube">[youtube]</a> ]]>        </description>
        <dc:creator>fandelost</dc:creator>
        <pubDate>Tue, 19 Feb 2008 11:21:55 +0000</pubDate>

            <category>embedd</category>
            <category>flv</category>
            <category>valid</category>
            <category>video</category>
            <category>w3c</category>
            <category>xhtml</category>
            <category>youtube</category>
    
    </item>


</channel>
</rss>
