Skip to content
WJunction - Webmaster Forum

PHP Title Error Linking

Status
Not open for further replies.
i have got a script completed, well kind of.

this is the index file i have got so far:

jQMSP.png


as you can see i am able to make all the data come from my chosen site and display it, such as title, type, date, time and size.

So, say i went to click on the link:

Mystery Case Files Shadow Lake Collectors Edition v1 0 0 0-TE

When hovering i get only the first word of the title, as you can see:

http://localhost/scrls/all.php?name=Mystery

can anyone think why this is?

i use this to get the movie title extraction:

PHP:
if($type=="movies"){
                        $matches = array();
                        preg_match("/(.*?)(dvdrip|xvid| cd[0-9]|dvdscr|brrip|divx|[\{\(\[]?[0-9]{4}).*/", $block->title, $matches);
                        $name=str_replace("(REQ)","", $matches[1]);
                        $name=str_replace("[REQ]","", $matches[1]);
                        $name=str_replace(" 3D","", $matches[1]);
                        $name=str_replace("CAM","", $matches[1]);
                        $name=str_replace("[Director's Cut]","", $matches[1]);
                        //echo "<font color=blue>".$name."</font>";
                        
                        if(trim($name)=="")
                            $name=$block->title;
                        
                        
                        $name1=str_replace(" ","%20", $matches[1]);
                    }
                    else
                    {
                        $name=$block->title;
                        $name1=$name;
                    }
 

4 comments

thanks for the help soft2050 - not that great with PHP you see so still mess up a few times, i am now currently tying to figure out how to save the extracted data into a database and then output it onto a template instead of just grabbing the top 50 links that are parsed which i currently have done.

i could use xPATH and use http://apify.heroku.com/resources but not 100% sure on how this works.
i have scraped the information i just am not sure on how to save data to a database, API-ify would work and i wouldnt have to store the data but not 100% sure on that method either.
 
I guess currently you are parsing results each time the url is opened. You should store them into a mysql database and then get results.
For new additions, you can create new php file that will parse results and add it to database and add a new cron job.

This should get you started with storing info into database

 
yeah when the url is opened it is parsing results, i will have a look on how to do this and see if i can do it. Basically what you said is what i want to do
 
Status
Not open for further replies.

About the author

B
Senior Member · Joined
1,286
Messages
211
Reactions
63
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom