Results 1 to 9 of 9

Thread: Need Important web scripts

  1. #1

    Default Need Important web scripts

    Hi everyone
    I am building website for my work as I make graphic designs and vector designing and also digitizing services.
    I need some important web scrpits:

    1.I use two chat services msn messenger and yahoo messenger.
    I want to give my customers an advantage to easily chat with my and see when I am online or offline through website. Also with click on yahoo or msn ID, directly open their message chat window with my Id.

    2. I want to show and trace Ip addresses and show their Ip addresses to visitors so that any unauthorized activity can be recorded.
    I also don't want any customer to re-register my website with same Ip.

    3.If you have some more and latest important web scripts for security reasons and other.
    Please share with me.

    Thanks in Advance

  2.    Advertissements


  3. #2
    Join Date
    Aug 2007
    Age
    19
    Posts
    1,575
    Rep Power
    43303

    Default

    With this little line you could get the IP from your visitors, if you know php of course:
    <?php
    $ip = GetHostByName($REMOTE_ADDR);
    ?>
    (found on the net, have not tested it)
    Like this post? Please add to my reputation.
    iPhone 4 32GB - Untethered jailbreak using Redsn0w

  4. #3
    Join Date
    Apr 2006
    Location
    C:\Program Files\Dade County
    Posts
    1,416
    Rep Power
    25670

    Smile

    This can make your users download mp3s. If you have some
    Code:
    <?php
    
    // get the file url from querystring
    $filename = $_GET['file'];
    $sitename = $_SERVER['SERVER_NAME'];
    
    // if the file url is on site it's not allowed to be downloaded - only on another site.
    if (mb_eregi($sitename, $filename)) {
    die( "The requested file cannot be retrieved for security reasons.");
    }
    if (!(mb_eregi('http:', $filename))) {
    die( "The requested file cannot be retrieved for security reasons.");
    }
    
    // required for IE, otherwise Content-disposition is ignored
    if(ini_get('zlib.output_compression')) { ini_set('zlib.output_compression', 'Off'); }
    
    
    // build file headers
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: private",false);
    
    // header for the content type
    $ext = strToLower(substr($filename,strlen($filename)-3, 3));
    if ($ext == "mp3" ) { header("Content-Type: audio/x-mp3"); }
    else if ($ext == "jpg") { header("Content-Type: image/jpeg"); }
    else if ($ext == "gif") { header("Content-Type: image/gif"); }
    else if ($ext == "png") { header("Content-Type: image/png"); }
    else if ($ext == "swf") { header("Content-Type: application/x-shockwave-flash"); }
    else if ($ext == "flv") { header("Content-Type: video/flv"); }
    
    // and some more headers
    header("Content-Disposition: attachment; filename=\"".basename($filename)."\";" );
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: ".filesize($filename));
    
    // refer to file and exit
    readfile("$filename");
    exit();
    
    ?>
    2. if you want to force download, the file needs to be hosted locally. If it is locally, you need to make sure users can only download files from a specific directory and of a specific file extension.
    You will want to strip out any bad characters, or maybe even just an episode number, have your mp3 file names with a consistant filename and use that.

    like this
    yourshow001.mp3
    Make sure then sent 3 numeric digits, and have readfile use only this structure.
    Code:
    $num = $_GET['show'];
    $filename = '/path/to/your/mp3/files/yourshow'.$num.'.mp3';
    
    if(strlen($num) != 3 || !is_int(substr($num,0,1)) || !is_int(substr($num,1,1)) || !is_int(substr($num,2,1)) || !file_exists($filename)) {
      echo 'Invalid file';
      exit;
    }
    // at this point you can proceed with the rest of your header() stuff and then doing readfile()
    This is making sure they are only sending 3 characters. Then that all are integer values, and finally that the file exists. You want it all in this order so that each part has to be validated and as soon as one fails, the script says invalid file and bails


    The attached file contains the scripts for creating a Shoutout box on your website. Well its free when you look harder.This is a PHP chat-box with integrated spam protection. It supports smilies / multiple languages and can be used with or without a MySQL database.
    Attached Files Attached Files
    Last edited by naughtydog; 07-02-2008 at 11:52 PM.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

    IF YOU LIKE MY POSTS DONT FORGET TO REP+ ME REP IS THIS LIL THING AT THE TOP RIGHT ->
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

    PSN: Geodex

  5. #4

    Default

    Thank you for sharing!

  6. #5

    Default

    thanks allot 4 the great code
    thats funny

  7. #6
    Join Date
    Sep 2007
    Location
    Sweden(right now)/Canada
    Age
    34
    Posts
    4,534
    Rep Power
    147207

    Default

    Moved to correct section, this should not be under BUY & SELL!
    [Only registered and activated users can see links. ] <- Read me!!!
    If You Like My Post Please Add Rep++ Instead of saying thanks.
    Rep Is The Star Symbol At The Bottom Left
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

    Its Simple and doesn't clutter threads with unnecessary posts.

    [Only registered and activated users can see links. ]

  8. #7

    Default

    oh i found this accidentally i was looking for this and found it haha!

  9. #8

    Default

    A Web Script is simply a service bound to a URI which responds to HTTP methods such as GET, POST, PUT and DELETE. While using the same underlying code, there are broadly two kinds of Web Scripts.

    Web Scripts allow you to:

    Build custom URI-identified and HTTP accessible Content Management Web Services
    Turn your Alfresco repository into a content management powered HTTP Server
    Easily access, manage, and cross-link your content via a tailored RESTful API

    You do not need tooling or Java knowledge. All you need is your favourite text editor or the Alfresco Explorer web client: no compilation, generators, server restarts, or complex installs.

  10. #9

    Default

    This change will require customers using our features scripts to make an important update, and it will have an impact, albeit small, on the way.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219