NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Really very important problem :(

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 11-29-2007, 03:51 PM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Nov 2007
Posts: 1
Crawler is an unknown quantity at this point
 



Help! Really very important problem :(


who help me???
My site is hosted at http://www.dreamhost.com and they don't allow the fopen function I get this error.

Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /home/.booboo/user/domain/admin/import.php on line 90

Any solution to this yet?

Again this error shows when I try to import videos

my code is ;
PHP Code:
<?php
/*------------------------------------------------------------------------*/
// Product: PHP MELODY - MUSIC VIDEO CMS
// Version: 1.1
// Released: 14th OCTOBER 2007
// Copyright: (c) 2004-2007. All rights reserved.
/*------------------------------------------------------------------------*/
$showm '2';
include(
'header.php');

// CHECK IF YOUTUBE DEV ID IS FILLED.
$q mysql_query("SELECT yt_api FROM pm_config WHERE id = '1'");
$r mysql_fetch_array($q);

if(empty(
$r['yt_api'])) {
$info_msg '<div class="info_msg_errimg"><B>WARNING!</B> You can\'t import videos from Youtube.com unless you have a Youtube Developer ID. Please <a href="settings.php">click here</a> to change your current settings.</div>';
}

?>
<div id="sub_menu">
<li><a href="addvideo.php">Add new video</a></li>
<li><a href="import.php">Import from Youtube</a></li>
<li><a href="reports.php">Reported Videos</a></li>
<li><a href="voth.php">Change video of the day</a></li>
</div>
<div id="content">
<h2>Import from Youtube</h2>
<?=$info_msg?>
<div class="info_msg">
Search Youtube for the latest and hottest videos and instantly import them into your own database.<br />
<br />To import a video just fill in the form on the left and press <strong>'Import'</strong>.<br />
<strong>*</strong> Titles you should consider adding have a red background. 
</div>
<form action="import.php" method="post">
<input name="keyword" type="text" onclick='value=""' value="<?=$_POST['keyword']?>" size="30" maxlength="30"/>
<input name="submit" type="submit" value="Find" class="inputbutton" />
</form>
<table width="100%" border="0" cellspacing="2" cellpadding="10">
  <tr class="table_head">
    <td width="40%">Youtube Title / Views</td>
    <td width="30%">Thumbnails</td>
    <td>Import</td>
  </tr>
  
<?
if($_POST['submit'] && !empty($_POST['keyword'])) {
$v str_replace(" ""+"$_POST['keyword']);

$file "http://www.youtube.com/api2_rest?method=youtube.videos.list_by_tag&dev_id="._YT_DEV."&page=1&per_page=25&tag=".$v."";
$youtube = array();
$youtube_index "";
$youtube_array_counter 0;
????: NamePros.com http://www.namepros.com/programming/401333-really-very-important-problem.html

function 
startElement($parser$name$attrs) {
       global 
$youtube$youtube_array_counter$youtube_index;
       switch(
$name) {
           case 
"VIDEO":
           case 
"VIDEO_LIST":
               
$youtube_index "";
               break;
        default:
            
$youtube_index $name;
            
$youtube[$youtube_array_counter][$youtube_index] = "";
            break;
    }
}

function 
endElement($parser$name) {
       global 
$youtube$youtube_index$youtube_array_counter;
       switch(
$name) {
           case 
"VIDEO":
               
$youtube_array_counter++;
               break;
       }
       
$youtube_index "";
}

function 
characterData($parser$data) {
    global 
$youtube$youtube_array_counter$youtube_index;
    if (
$youtube_index != "") {
        
$youtube[$youtube_array_counter][$youtube_index] .= trim($data);
    }
    
}

$xml_parser xml_parser_create();
xml_set_element_handler($xml_parser"startElement""endElement");
xml_set_character_data_handler($xml_parser"characterData");
if (!(
$fp fopen($file"r"))) {
    die(
"could not open XML input");
}

while (
$data fread($fp4096)) {
    if (!
xml_parse($xml_parser$datafeof($fp))) {
        die(
sprintf("XML error: %s at line %d",
                    
xml_error_string(xml_get_error_code($xml_parser)),
                    
xml_get_current_line_number($xml_parser)));
    }
}
xml_parser_free($xml_parser);

// begin formatting
    
$alt '0';
for(
$i 0;$i count($youtube);$i++) {
        
    
$title $youtube[$i]["TITLE"];
    
$id $youtube[$i]["ID"];
    
$time $youtube[$i]["LENGTH_SECONDS"];
    
$thumb $youtube[$i]["THUMBNAIL_URL"];
    
$views $youtube[$i]["VIEW_COUNT"];
    
$u_id md5($id);
    
$u_id substr($u_id09);  // abcd

    
$song str_replace("+"" "$song);
    
$song addslashes($song);
    
$artist str_replace("+"" "$artist);
    
$artist addslashes($artist);

    if(
$time '120') {
        
$check mysql_query("SELECT yt_id FROM pm_videos WHERE yt_id = '$id'");
????: NamePros.com http://www.namepros.com/showthread.php?t=401333
        
$result = @mysql_fetch_array($check);

        if(
$id != $result['yt_id']) { 
    
$col = ($alt 2) ? 'table_row1' 'table_row2';
    
$alt++;
    if(
$views 2000000) { $col 'hot'$h3class 'yt_title_hot'; } else { $h3class 'yt_title'; }

?>
  <tr>
    <td class="<?=$col?>">
    <h3><A href="http://www.youtube.com/watch?v=<?=$id?>" target="_blank" class="<?=$h3class?>"> <?=$title?><img src="http://cdn.namepros.com/images/go_open.gif" alt="Go" border="0" /></A></h3>
    <strong>Youtube Views:</strong> <?=$views?>
    </td>
    <td class="<?=$col?>">
<img src="http://img.youtube.com/vi/<?=$id?>/1.jpg" alt="1" width="100" height="76" border="0"/>
<img src="http://img.youtube.com/vi/<?=$id?>/2.jpg" alt="2" width="100" height="76" border="0"/>
<img src="http://img.youtube.com/vi/<?=$id?>/3.jpg" alt="3" width="100" height="76" border="0"/>
    </td>
    <td bgcolor="#FFFFFF">
    <iframe src="import_add.php?videoid=<?=$id?>" marginwidth="0" marginheight="0" width="170" height="100" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>
    </td>
  </tr>
<?
}

    } else {
}

}

}
echo 
'
</table>
</div>
'
;
include(
'footer.php');
?>

how i convert to the cURL ???
thanks for help
Crawler is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:33 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger