staypimp.in

Twitter

    PHP get_headers

    Posted on April 28, 2013 by admin

    I found an awesome PHP function that will let me work with HTTP headers :) Using PHP’s get_headers we can pull headers of whatever we want, very easily. See the below example. Placing random example here.

    <?php

    // Usage:: http://yourhost.tld./gethead.php?server=hostname.tld
    $targ = $_GET['server'];
    $head = get_headers(“http://$targ”, 1);
    foreach ( $head as $data ) {
    print “<br>$data<br>”;
    }
    ?>

    Posted in Uncategorized |

    Pages

    Archives

    • April 2013

    Categories

    • Uncategorized (1)

    WordPress

    • Log in
    • WordPress

    Subscribe

    • Entries (RSS)
    • Comments (RSS)
    © staypimp.in