1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need someone to make an easy change on a PHP script

Discussion in 'PHP & Perl' started by dgfalk, Jul 26, 2010.

  1. dgfalk

    dgfalk Power Member

    Joined:
    Apr 26, 2010
    Messages:
    687
    Likes Received:
    94
    I have this script that pulls articles off an RSS feed and posts it to my website. It will post the first part of the article then it says "to read the rest of the article click here"

    What I dont like about it is that sometimes it will post the first 10 words of the article or sometimes it will post the first 50 words (never seen it more than 50) I want it to post at least the first 100-150 words of the article so i keep the user on my page longer. Ive looked at the script but I dont know shit about PHP and couldn't find where to change it.

    Anyone willing to look at it for me real quick?
     
  2. dollarfish

    dollarfish Newbie

    Joined:
    Mar 8, 2010
    Messages:
    20
    Likes Received:
    3
    it will not be so quick
     
  3. dgfalk

    dgfalk Power Member

    Joined:
    Apr 26, 2010
    Messages:
    687
    Likes Received:
    94
    Whys do you say that? Im sure theres just some kind of number in the script that it tells how many of words to pull.
     
  4. Bots_Do_it_Faster

    Bots_Do_it_Faster Registered Member

    Joined:
    Jun 28, 2010
    Messages:
    64
    Likes Received:
    77
    Occupation:
    Web Developer php and c#
    Location:
    South Florida
    The fact that it is randomly changing the intro length would make me guess it is not actually limiting the length, but rather just pulling the full intro provided in your rss feed. I know of many CMS systems that allow the user to manually copy and paste there own "Intro" from the original article to be used in there rss feeds. Easy way to check is to look at your raw rss feed and see if it matches what is making it to your site. If it turns out that the rss feed does have a lot more info that is getting cut short then let me see your script and I'd be glad to help you normalize the output.
     
  5. dgfalk

    dgfalk Power Member

    Joined:
    Apr 26, 2010
    Messages:
    687
    Likes Received:
    94
    Ah ha, you are right on here. It is posting the full RSS feed, and the RSS feed is the into/first paragraph of the article. Doesn't look like theres anyway around this.
     
  6. Bots_Do_it_Faster

    Bots_Do_it_Faster Registered Member

    Joined:
    Jun 28, 2010
    Messages:
    64
    Likes Received:
    77
    Occupation:
    Web Developer php and c#
    Location:
    South Florida
    There is a way around it, but labor wise it is not always very cost effective. You could make a spider that looks at the rss feed then goes to the site and pulls more of the article then chops it down to an even amount. I've had several customers that it bothered them that much lol.