Interesting links

  • This is a pastebin like place where I put stuff I find useful


Refreshing a div from with fade in:

Code: [Select]<script type=”text/javascript”>
$(document).ready(function() {
var refreshId = setInterval(function() {
}, 5000);
$.ajaxSetup({ cache: false });


  • snippet 2:


Posting to a form from php

  • posting to a form from php
  • I also have this code i used before successfully:
  • //$output2=HTTP_Post(“”,$_POST);
          function HTTP_Post($URL,$data, $referrer=””) {
            // parsing the given URL
            // Building referrer
            if($referrer==””) // if not given use this script as referrer
            // making string from $data 
            foreach($data as $key=>$value)
    //   print “$key :: $value\n”;
            // Find out which port is needed – if not given use standard (=80)
            // building POST-request:
            $request.=”POST “.$URL_Info[“path”].” HTTP/1.1\r\n”;
            $request.=”Host: “.$URL_Info[“host”].”\r\n”;
            $request.=”Referer: $referrer\r\n”;
    $request.=”Accept-language: en\r\nCookie: “. “ASPSESSIONIDQATBADCS=HINAJNDBFJMLOJFHPLHPCDOE”.”\r\n” .
       “User-Agent: Mozilla 4.0\r\n” . 
             “Content-type: application/x-www-form-urlencoded\r\n” . 
             “Content-length: “.strlen($data_string).”\r\n”;
            $request.=”Connection: close\r\n”;
            $fp = fsockopen($URL_Info[“host”],$URL_Info[“port”]);
            fputs($fp, $request);
            while(!feof($fp)) {
                $result .= fgets($fp, 128);
            return $result;


Leave a Reply

Your email address will not be published. Required fields are marked *