Page 2 of 10 FirstFirst 1234 ... LastLast
Results 11 to 20 of 95

Thread: Free URL Shortening Script

  1. #11
    5starpix's Avatar
    5starpix is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    Montreal, Quebec
    Posts
    1,710
    Blog Entries
    9
    Thanks
    158
    Thanked 227 Times in 164 Posts
    Thanks for the script, and thank you dtkguy for that fix

  2. #12
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    Nice find and thank you for providing a fix for it.

    If you figure out the header error when logging into the admin that would be awesome Seems the header is being sent twice when logging in. Even though it doesnt effect it since its prior to the admin redirect.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  3. #13
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    the header error fix :

    at around lines 74-86 in adminlogin.php you'll see this:
    Code:
    else {
                    
                        $check = mysql_query("SELECT * FROM `admin` WHERE `username` = '$username' AND `password` = '$password'") or die('Error selection');
                        
                            if(mysql_num_rows($check) == '1') {
                            
                                $_SESSION['username'] = "$username";
                                $_SESSION['password'] = "$password";
                                
                                    header("Location: admincp.php");
                                    
                                    echo "<meta http-equiv=\"refresh\" content=\"2; admincp.php\" /><div class=\"generated\">You are logged in. Redirecting..</div>";                
                            }
    we don't need the header("Location: admincp.php"); the meta refresh is what we're looking for, but sending the headers skips that, thus the error. just comment out or delete that line. (i commented it out for sake of keeping original code).

    Code:
    /* header("Location: admincp.php"); */
    seems to be working fine for me.

    Cheers!

  4. Thanked by:

    abinowbhat (28 March, 2010), Will.Spencer (31 December, 2008)

  5. #14
    5starpix's Avatar
    5starpix is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    Montreal, Quebec
    Posts
    1,710
    Blog Entries
    9
    Thanks
    158
    Thanked 227 Times in 164 Posts
    Cheers for dtkguy

  6. #15
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    I have to say you are a keeper Thank you now I have a link to refer people to when they ask about this error

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  7. #16
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    Quote Originally Posted by Mr.Bill View Post
    I have to say you are a keeper Thank you now I have a link to refer people to when they ask about this error
    Haha, Happy to help! now to make a few minor mods for my own purposes and then reg a domain and put this baby to work

  8. #17
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    dtkguy if you want I have urlxp.com @ namecheap if you want it for you help on this

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  9. Thanked by:

    Charles (31 December, 2008), dtkguy (31 December, 2008)

  10. #18
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    wow really. thats very kind of you! PM'ing you now.

  11. #19
    misoo83 is offline Unknown Net Builder
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks

  12. #20
    dotcompals's Avatar
    dotcompals is offline SEO SEM SMM
    Join Date
    Dec 2008
    Location
    India
    Posts
    27
    Thanks
    16
    Thanked 6 Times in 3 Posts
    Quote Originally Posted by dtkguy View Post
    Thanks Mr.Bill, very nice script. The only problem I noticed with it is the fact that the advert section shows up on every page (including admin) when it really only needs to be on index, newest, and most. I just added a quick function and if statement to it to do that.

    for any one that wants/needs it (the red text is what i added to advert.php):

    Code:
    <?php
    
     /* Only Show Ads on Index, New, and Top */
    function curPageName() {
     return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
    }
    $PageName = curPageName();
    
    if ($PageName == 'index.php' || $PageName == 'newest.php' || $PageName == 'most.php') { 
    
    
        $adverts = mysql_query("SELECT * FROM `admin`") or die('Error selecting site name');
        
        while($rowt = mysql_fetch_array($adverts)) {
        
            echo "";
        
            $advert = html_entity_decode($rowt['advert'], ENT_NOQUOTES);
            
                echo "<p align=\"center\">".$advert."</p>";
                
        }
        
     }
    
    ?>
    Cheers!
    getting the below error after adding the above code at advert.php

    Parse error: syntax error, unexpected $end in /home/shor10c/public_html/advert.php on line 23
    Post Panda / Post Penguin SEO Packages.
    Contact dotcompals@gmail.com
    Skype: dotcompals

Page 2 of 10 FirstFirst 1234 ... LastLast

Similar Threads

  1. [WTB] URL Shortening
    By GeeOne in forum Scripts
    Replies: 0
    Last Post: 6 August, 2010, 08:59 AM
  2. [Free] URL & Link shortening
    By GeeOne in forum Marketplace
    Replies: 0
    Last Post: 23 February, 2010, 12:36 PM
  3. Replies: 1
    Last Post: 14 January, 2010, 18:05 PM
  4. [Free] Free URL shortening services
    By GeeOne in forum Services
    Replies: 0
    Last Post: 4 January, 2010, 08:36 AM
  5. Replies: 2
    Last Post: 20 November, 2009, 00:36 AM

Tags for this Thread

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
  •