Advanced Search

Results 1 to 2 of 2

Thread: need help with this

  1. #1
    Join Date
    May 2007
    Posts
    23
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Post need help with this

    i need help creating a script similar to this

    hi guys i am looking for this script or i want to create script almost similar i do a copy of url2hide but url2hide uses mysql to save the data but rather i want to save in a .text file on the server right need help either looking a script or make my own , script similar to

    Code:
    http://url2hide.com/
    http://pastebin.com
    url2hide creates short url and pastebin.com users paste text or any data in then press enter and creates a URL where the other users can view the source data

    Code:
    http://pastebin.com/d36d177c2
    i also want to do something similar .

    but i only will want to paste the any type of HTML or embed codes or JavaScript codes so when i hit paste rather then viewing the code in a text similar to paste-bin i want to see the codes execute it self. only problem this script uses mysql. but if you guys look at this script
    Code:
    http://www.phpjunkyard.com/php-click-counter.php
    it uses txt to save the data.

    also similar to
    http://www.mrbrownee70.com
    which generates a url but rather it grabs url from other website, but i don't want that,
    http://www.megaupload.com/?d=QT13HU16
    http://i49.tinypic.com/2ihwe47.jpg
    http://i50.tinypic.com/2nve3qs.jpg

    this script is the short url, but i need help modifiying it.

    Code:
    http://pastebin.com/m705d0417
    this script generates script like this
    http://seo.zssales.co.cc/tools/shortcut/1262406839.html

    the script will generate a url link inside hte html

    HTML Code:
    <head>
    <meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org">
    <title>Player</title>
    
    </head> 
    <body>
    
    
    <center><div align="center">
    <IFRAME SRC="center_ad_468x60.php" width=500 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME> 
    
    <table>
    <tr>
    <th><IFRAME SRC="left_ad_160x600.php" width=160 height=600 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME></th>
    <th><IFRAME SRC="center_ad_468x60.php" width=448 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME><center>
     <script type="text/javascript">
    
    	function closead() {
    	var e = document.getElementById("aad");
    	e.style.visibility = 'hidden';
    
    	var e = document.getElementById("mediaspace");
    	e.style.visibility = '';
    
    	 }
    
    </script>
    
    
     <div id="aad" class="ad" align="center" style="position:absolute; center; margin-left:-15px; margin-right:-15px; margin-top:90px; margin-buttom:90px;  width: 310px; height: 280px; z-index: 2; border: 1px solid #555; background-color: #CCCCCC;" >
    <p align=center> <div align="center">
     <center>
    <IFRAME align=center FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="ad.php"></IFRAME>
    <a style="color: black; font-size: 22px; " href="javascript:void(0)" onclick="closead(); lads(); " target="mediaspace"><img   target="mediaspace" src="closetoplay.gif" onmouseover="this.src='closetoplay-mo.gif';" onmouseout="this.src='closetoplay.gif';" border="0" /></a>
    </center></p></div></div>
    <!-- from this --><div name="mediaspace" id="mediaspace">
    Script will auto paste here while generating a url for it.</div><!-- to this has been encoded -->
    <center><IFRAME SRC="center_ad_down_468x60.php" width=448 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME><center><br />
    </th>
    <th><IFRAME SRC="right_ad_160x600.php" width=160 height=600 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME>
    </th>
    </tr>
    </table>
    </div>
    <IFRAME  SRC="ads.php" width=500 height=89 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME> </div></center></body> 
    </body> 
    </html>
    Last edited by dj30324; 01-06-2010 at 07:16 AM.

  2. #2
    Join Date
    May 2007
    Posts
    23
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Exclamation

    ok guys
    Code:
    index.php
    --------
    <?
    session_start();
    // MySQL Configuration
    $mysql['server'] = "localhost"; // MySQL Server
    $mysql['user'] = ""; // MySQL Username
    $mysql['pass'] = ""; // MySQL Password
    $mysql['db'] = ""; // Database
    
    $link_to_shortcut = "http://www.yoursite.com/shortcut/"; // Full URL to shortcut folder - END WITH TRAILING SLASH
    ?>
    <form method="POST" action="shortener.php">
    <table>
    <tr><td>URL:</td><td><input type="text" name="url" value="http://"></td></tr>
    <tr><td valign="top">Verify:</td><td><img src="captcha.php"><br/><input type="text" name="captcha"></td></tr>
    <tr><td colspan=2><input type="submit" name="submit" value="Shorten URL"></td></tr>
    </table>
    </form><br/>
    <?
    if (isset($_POST['submit'])) {
    if (!empty($_POST['captcha']) && strstr(strtolower($_SESSION[captchastr]),strtolower($_POST['captcha'])) && $_POST['url'] != "") {
     $time = time();
     mysql_connect($mysql['server'],$mysql['user'],$mysql['pass']) or die("Could not connect to MySQL - check configuration in this page");
     mysql_select_db($mysql['db']) or die("Could not select MySQL database - check configuration in this page");
     if (mysql_query("INSERT INTO `shortcuts` VALUES('".$time."','".addslashes($_POST['url'])."')")) {
      echo 'Your URL shortcut: <input type="text" value="'.$link_to_shortcut.$time.'.html">';
     }
     else
     {
      echo "Could not create shortcut - internal error.";
     }
    }
    else
    {
     echo "Invalid image verification!<br/>";
    }
    }
    ?>
    -------
    captcha.php
    -----------
    <?php
    session_start();
    $strlength = rand(4,7);
    
    function createRandomString() {
    
        $chars = "abcdefghijkmnopqrstuvwxyz023456789";
        srand((double)microtime()*1000000);
        $i = 0;
        $pass = '' ;
    
        while ($i <= 7) {
            $num = rand() % 33;
            $tmp = substr($chars, $num, 1);
            $pass = $pass . $tmp;
            $i++;
        }
    
        return $pass;
    
    }
    
    $captchastr = strtoupper(createRandomString());
    
    $randcolR = rand(100,230);
    $randcolG = rand(100,230);
    $randcolB = rand(100,230);
    
    //initialize image $captcha is handle dimensions 200,50
    $captcha = imageCreate(200,50);
    $backcolor = imageColorAllocate($captcha, $randcolR, $randcolG, $randcolB);
    
    $txtcolor = imageColorAllocate($captcha, ($randcolR - 40), ($randcolG - 40), ($randcolB - 40));
    for($i=1;$i<=$strlength;$i++)
    {
    
    $clockorcounter = rand(1,2);
    if ($clockorcounter == 1)
    {
    $rotangle = rand(0,45);
    }
    if ($clockorcounter == 2)
    {
    $rotangle = rand(315,360);
    }
    
    //$i*25 spaces the characters 25 pixels apart
    imagettftext($captcha,rand(14,20),$rotangle,($i*25),30,$txtcolor,"/arial.ttf",substr($captchastr,($i-1),1));
    }
    for($i=1; $i<=4;$i++)
    {
    imageellipse($captcha,rand(1,200),rand(1,50),rand(50,100),rand(12,25),$txtcolor);
    }
    for($i=1; $i<=4;$i++)
    {
    imageellipse($captcha,rand(1,200),rand(1,50),rand(50,100),rand(12,25),$backcolor);
    }
    //Send the headers (at last possible time)
    header('Content-type: image/png');
    
    //Output the image as a PNG
    imagePNG($captcha);
    
    //Delete the image from memory
    imageDestroy($captcha);
    
    $_SESSION[captchastr] = $captchastr;
    
    ?>
    -----
    /shortcut/index.php
    ----
    <?
    // MySQL Configuration
    $mysql['server'] = "localhost"; // MySQL Server
    $mysql['user'] = ""; // MySQL Username
    $mysql['pass'] = ""; // MySQL Password
    $mysql['db'] = ""; // Database
    
    $ad = "YOUR SITE HERE"; // Advertisement string
    
    mysql_connect($mysql['server'],$mysql['user'],$mysql['pass']) or die("Could not connect to MySQL - check configuration in this page");
    mysql_select_db($mysql['db']) or die("Could not select MySQL database - check configuration in this page");
    if (isset($_GET['modrw'])) {
     $query = mysql_query("SELECT * FROM `shortcuts` WHERE `id` = '".addslashes($_GET['modrw'])."' LIMIT 1");
     if (mysql_affected_rows() > 0) {
      $row = mysql_fetch_assoc($query);
     }
     else
     {
      echo "Invalid Shortcut ID";
      exit;
     }
    }
    else
    {
     exit;
    }
    ?>
    <html>
    
    <head>
    <title><? echo $ad; ?>  - Shortcut - <? echo $row['url']; ?></title>
    </head>
    
    <frameset rows="55,*" framespacing="0" border="0" frameborder="0">
    	<frame name="topper" scrolling="no" noresize src="topframe.php">
    	<frame name="bottom" src="<? echo $row['url']; ?>" scrolling="auto">
    	<noframes>
    	<body>
    
    	<p>Please visit <? echo $row['url']; ?></p>
    
    	</body>
    	</noframes>
    </frameset>
    
    </html>
    -----
    /shortcut/.htaccess
    RewriteEngine on
    RewriteRule ^(.*)\.html$ index.php?modrw=$1 [L]
    =======
    /shortcut/topframe.php
    This is the top frame to the URL shortner.  Here you can put a logo for your site, or 
    whatever your heart might desire.
    =========================
    mysql table
    ----------
    CREATE TABLE `shortcuts` (
      `id` text NOT NULL,
      `url` text NOT NULL
    );
    If you look at the code above
    Code:
    <frameset rows="55,*" framespacing="0" border="0" frameborder="0">
    	<frame name="topper" scrolling="no" noresize src="topframe.php">
    	<frame name="bottom" src="<? echo $row['url']; ?>" scrolling="auto">
    	<noframes>
    i did try the same thing but rather

    putting this
    PHP Code:
    <head>
    <meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org">
    <title>Player</title>

    </head> 
    <body>


    <center><div align="center">
    <IFRAME SRC="center_ad_468x60.php" width=500 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME> 

    <table>
    <tr>
    <th><IFRAME SRC="left_ad_160x600.php" width=160 height=600 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME></th>
    <th><IFRAME SRC="center_ad_468x60.php" width=448 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME><center>
     <script type="text/javascript">

        function closead() {
        var e = document.getElementById("aad");
        e.style.visibility = 'hidden';

        var e = document.getElementById("mediaspace");
        e.style.visibility = '';

         }

    </script>


     <div id="aad" class="ad" align="center" style="position:absolute; center; margin-left:-15px; margin-right:-15px; margin-top:90px; margin-buttom:90px;  width: 310px; height: 280px; z-index: 2; border: 1px solid #555; background-color: #CCCCCC;" >
    <p align=center> <div align="center">
     <center>
    <IFRAME align=center FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="ad.php"></IFRAME>
    <a style="color: black; font-size: 22px; " href="javascript:void(0)" onclick="closead(); lads(); " target="mediaspace"><img   target="mediaspace" src="closetoplay.gif" onmouseover="this.src='closetoplay-mo.gif';" onmouseout="this.src='closetoplay.gif';" border="0" /></a>
    </center></p></div></div>
    <!-- from this --><div name="mediaspace" id="mediaspace">
    Script will auto paste here while generating a url for it. 
    <? echo $row['url']; ?>
    </div><!-- to this has been encoded -->
    <center><IFRAME SRC="center_ad_down_468x60.php" width=448 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME><center><br />
    </th>
    <th><IFRAME SRC="right_ad_160x600.php" width=160 height=600 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME>
    </th>
    </tr>
    </table>
    </div>
    <IFRAME  SRC="ads.php" width=500 height=89 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME> </div></center></body> 
    </body> 
    </html>
    it didnt work i tried over and over pasting html or iframe or embed player and while it suppose to generate an url it doesnt work. please help me


    RESOLVED! THANKS MOTO for pm.
    Last edited by dj30324; 01-06-2010 at 07:15 AM.

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
  •