Page 3 of 10 FirstFirst 12345 ... LastLast
Results 21 to 30 of 95

Thread: Free URL Shortening Script

  1. #21
    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 dotcompals View Post
    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
    hmm, could you please paste your full advert.php into a code box here for me? i'll see if notice anything. thanks.

  2. #22
    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
    hmm, could you please paste your full advert.php into a code box here for me? i'll see if notice anything. thanks.
    Advert.php

    Code:
    <?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>";
                
        }
        
    ?>
    Post Panda / Post Penguin SEO Packages.
    Contact dotcompals@gmail.com
    Skype: dotcompals

  3. #23
    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
    Replace all the code in the advert.php file with this

    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>";
                
        }
        
     }

    ?>
    Everything should be fine its been tested and is used on the demo

    as for your other question via PM sorry no easy way to do this. Just back up urls and ip tables in phpmyadmin and reinstall the script. Once you have done so then add the backups back to phpmyadmin area

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

  4. #24
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    yep. its possible maybe it slipped up when you copied/pasted before. do as mr.bill says and replace all in advert.php with what he posted. that is the working solution.

  5. #25
    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 how hard would it be to add a admin password reset to this via the admin area? and a password reminder on the login page?

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

  6. #26
    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
    dtkguy how hard would it be to add a admin password reset to this via the admin area? and a password reminder on the login page?
    password reset/change should be pretty straight forward.

    the reminder would be a little more work, first how would the reminder work? would, during install, it ask for a reminder question (from say a drop down box of predefined questions) and then user supplied answer? or just ask for admin email as the reminder condition? and then it would email the password to the admin email on file?

    either way would work, the question/answer would need fields added to the database, the email only condition shouldn't need anything additional.

    i'll explore it tonight when I have some time, and see what I can come up with if you'd want..

  7. #27
    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
    Just the email reminder so it send it the email in the database. Used during setup.

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

  8. #28
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    OK that shouldn't be too bad then I will look into it tonight. Should have something for us later tonight or tomorrow depending on my free time this evening.

  9. #29
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    Mr.Bill : Attached is a zip file entitled admin_update.zip within this zip is an updated admincp.php file and a new file called adminpwd.php. These current updates allow for the changing of the admin password. Please try them out and let me know how it works for you. It worked fine for me on mine.

    Note : Please be sure to backup your original admincp.php file before using this one in case you need to revert the changes.

    Now on to the Reminder, because the password is SHA1'd it does not allow for us to send out the ascii variant in a reminder notice. What I can do however is come up with a function that will generate and send a Random Password to allow them to login and then change the password in the AdminCP. Would that work for you?

    admin_update.zip has been replace with admin_update_v2.zip available on this post : Free URL Shortening Script
    Last edited by dtkguy; 16 January, 2009 at 20:41 PM.

  10. #30
    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
    If that is the easiest way then that is fine, dont go out of your way or commit too much work to it. I will test that other file right now


    Works perfectly

    Only thing with the admin email idea is would need like a link forgot password then in another window you would have input the email you used at sign up and if the emails match then it sends a new password. Or it could be hell for you if someone found your admin login page.

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

Page 3 of 10 FirstFirst 12345 ... LastLast

Similar Threads

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

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
  •