Activity Stream
48,167 MEMBERS
6862 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member
    Website's:
    Rapidleech.com FullMaza.com WarezOcean.com MediaFireForum.com

    Default Smarty Help Needed

    Hello,

    I am trying to include a php file in smarty file by using

    PHP Code: 
    {include_php file='/path/to/file.php'
    but i am getting these errors:

    PHP Code: 
    WarningSmarty errorfile:imdb.php is not readable in ../../smarty/libs/Smarty.class.php on line 1093

    Warning
    : include() [function.include]: Filename cannot be empty in ../../smarty/libs/Smarty.class.php on line 1923

    Warning
    : include() [function.include]: Filename cannot be empty in ../../smarty/libs/Smarty.class.php on line 1923

    Warning
    : include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php'in ../../smarty/libs/Smarty.class.php on line 1923

    Fatal error
    : Class 'Imdb' not found in templates_c/%%48^485^485E6CB9%%imdb.tpl.php on line 12 
    It's a php library to fetch imdb info.

    Any help will be appreciated.

    Thanks
    -Pal
    Palooo 2009 Reviewed by Palooo 2009 on . Smarty Help Needed Hello, I am trying to include a php file in smarty file by using {include_php file='/path/to/file.php'} but i am getting these errors: Warning: Smarty error: file:imdb.php is not readable in ../../smarty/libs/Smarty.class.php on line 1093 Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Bharat's Avatar
    Website's:
    ShineServers.Com Pickadedi.com
    its the source code for PHP IMDB Information Grabber . . . try out inserting this onto ur php , it will automatically parse the imbd info

    Code: 
    //url $url = 'http://www.imdb.com/title/tt0367882/';  //get the page content $imdb_content = get_data($url);  //parse for product name $name = get_match('/<title>(.*)<\/title>/isU',$imdb_content); $director = strip_tags(get_match('/<h5[^>]*>Director:<\/h5>(.*)<\/div>/isU',$imdb_content)); $plot = get_match('/<h5[^>]*>Plot:<\/h5>(.*)<\/div>/isU',$imdb_content); $release_date = get_match('/<h5[^>]*>Release Date:<\/h5>(.*)<\/div>/isU',$imdb_content); $mpaa = get_match('/<a href="\/mpaa">MPAA<\/a>:<\/h5>(.*)<\/div>/isU',$imdb_content); $run_time = get_match('/Runtime:<\/h5>(.*)<\/div>/isU',$imdb_content);  //build content $content.= '<h2>Film</h2><p>'.$name.'</p>'; $content.= '<h2>Director</h2><p>'.$director.'</p>'; $content.= '<h2>Plot</h2><p>'.substr($plot,0,strpos($plot,'<a')).'</p>'; $content.= '<h2>Release Date</h2><p>'.substr($release_date,0,strpos($release_date,'<a')).'</p>'; $content.= '<h2>MPAA</h2><p>'.$mpaa.'</p>'; $content.= '<h2>Run Time</h2><p>'.$run_time.'</p>'; $content.= '<h2>Full Details</h2><p><a href="'.$url.'" rel="nofollow">'.$url.'</a></p>';  echo $content;  //gets the match content function get_match($regex,$content) {   preg_match($regex,$content,$matches);   return $matches[1]; }  //gets the data from a URL function get_data($url) {   $ch = curl_init();   $timeout = 5;   curl_setopt($ch,CURLOPT_URL,$url);   curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);   curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);   $data = curl_exec($ch);   curl_close($ch);   return $data; }
    As with my other grabbers, the trick is always in the regular expressions. Note that the most important part of the URL is the string after "/title/". That string uniquely identifies the movie.

  4.     
    #3
    Member
    Website's:
    Rapidleech.com FullMaza.com WarezOcean.com MediaFireForum.com
    Thanks for the help bharatvashist.

    but i don't need IMDB Info grabber, i have a fully working IMDB Info Grabber, i am just trying to embed it into smarty file but some due to some reason i am unable to include it in smarty file.

  5.     
    #4
    Member
    I can fix that for you, for a price.

  6.     
    #5
    Banned
    Website's:
    xsl.tel xsltel.com
    Hello,

    I'm not a php developer
    but was wondering if this would work for you in smarty :
    Code: 
    {php} 
    include("path/to/file.php"); {/php}
    Highest Regards
    Mohammed H

  7.     
    #6
    Respected Member
    Where is the Smarty error: file:imdb.php

    That is the one it is complaining about.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help needed
    By Divvy in forum Server Management
    Replies: 8
    Last Post: 14th Dec 2011, 02:36 AM
  2. USA VPS Needed
    By Raptile in forum Hosting Discussion
    Replies: 0
    Last Post: 18th Sep 2010, 02:34 PM
  3. DEDICATED,ACTIVE NEEDED - Moderators/GM's Needed with BENEFITS
    By robert in forum Community Cooperative
    Replies: 0
    Last Post: 18th Jul 2010, 03:36 PM
  4. Replies: 5
    Last Post: 19th Feb 2010, 06:38 PM
  5. Staff Needed Posters NEEDED.!! With Benefits!
    By timboy18 in forum Community Cooperative
    Replies: 2
    Last Post: 17th Jul 2009, 06:54 AM

Tags for this Thread

BE SOCIAL