Modify your friends' My Buddies links

Discussion in 'Mac Help/Questions and Tips' started by PCheese, Nov 18, 2004.

  1. PCheese macrumors member

    Aug 9, 2004
    Hmm, where to post this...

    You know that 'my buddies' link some AIM users have started putting on their profiles? Well here's a little php script you can use to mess with their lists...

    This was cooked up really quickly by myself, so it has undergone limited testing. Be careful, it uses shell commands, so although I believe I've escaped them relatively well, they may be a security risk to your server. Use this code at your own risk.

    After school tomorrow I'll have a bit more time to clean it up and add some more features I have in mind... :)

    Have fun.

    if(isset($_REQUEST['source'])) {
    $AIMAgent = 'AIM/30 (Mozilla 1.24b; Windows; I; 32-bit)';
    if(isset($_REQUEST['delurl'])) {
        $parsed = parse_url($_REQUEST['urldelete']);
        $site = escapeshellcmd($parsed['host'].$parsed['path']);
        $queryStr = str_replace('\&', '&', escapeshellcmd($parsed['query']));
        passthru("curl -d '$queryStr' -G -A '$AIMAgent' $site");
    if(isset($_REQUEST['add']) || isset($_REQUEST['viewadmin'])) {
        $person1 = escapeshellcmd($_REQUEST['buddy']);
        if(isset($_REQUEST['viewadmin'])) {
            $person2 = $person1;
            $person2 = escapeshellcmd($_REQUEST['sntoadd']);
        passthru("curl -d 'file=$person1&name=$person2' -G -A '$AIMAgent'");
    <h1>"My Buddies" Link Editor</h1>
    <h5>Brought to you by <a href="">PCheese</a></h5>
    <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    Modify the link of which AIM screenname?<br>
    <input type="text" name="buddy"><br><br>
    Screenname to add?<br>
    <input type="text" name="sntoadd" size="16"><br>
    <input type="submit" name="add" value="Add Screenname">        <input type="submit" name="viewadmin" value="View Admin">
    <br>To delete a user, copy the link into here and press delete:
    <input type="text" name="urldelete">
    <input type="submit" name="delurl" value="Delete">
    <a href="?source=go">source code</a>
  2. Doctor Q Administrator

    Doctor Q

    Staff Member

    Sep 19, 2002
    Los Angeles
    The "Mac Help/Questions and Tips" forum is the most appropriate home for this "tip".

    Thanks for posting it!

Share This Page