/    Sign up×
Community /Pin to ProfileBookmark

Warning: file_get_contents (…): failed to open stream:

I’m Problem with my mp3 script, when i try to search video, thare is the problem..!

[QUOTE]

Warning: file_get_contents([url]http://www.youtube.com/results?search_query=rihanna&page=1):[/url] failed to open stream: Permission denied in /home/www/connected.freehostia.com/music/engine/mp3/sources/video/youtube.php on line 7

[/QUOTE]

youtube.php

[code=php]<?
$p = $_GET[‘page’];
$srch = str_replace(‘ ‘, ‘%20’, $srch);
$srch = str_replace(‘.’, ‘ ‘, $srch);
//$srch = urldecode($srch);
$url1 = ” . ‘http://www.youtube.com/results?search_query=’ . $srch . ‘&page=’ . $p;
$res = file_get_contents($url1);
$i = 1;
$hitung = 0;
$res = strstr($res, ‘<div id=”results-main-content”>’);

if ($res)
{
while ($i <= 20)
{
$res = strstr($res, ‘<div class=”video-entry”>’);
$dodol = extstres($res, ‘<a id=”video-url’, ‘</a>’);
$name = extstres($dodol, ‘<img title=”‘, ‘”‘);
$id = extstres($dodol, ‘qlicon=”‘, ‘”‘);

$getimg = extstres($res, ‘<img title=”‘, ‘qlicon’);
$img = extstres($getimg, ‘”http://i’, ‘”‘);
$img = ‘http://i’ . $img;
// echo $getimg;
$gettime = extstres($res, ‘<span id=”video-run-time’, ‘/span>’);
$runtime = extstres($gettime, ‘>’, ‘<‘);

$res = strstr($res, ‘<div class=”video-clear-list”></div>’);

if ($name == ”)
{
$nomsg = $nomsg + 50;
}
else
{
++$hitung;
include ENGINE_DIR . ‘/mp3/video_template.php’;
}
++$i;
}
}
?>
[/code]

I Using free hosting
Please help..
Thank U

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@SodbusterJan 31.2009 — Most, if not all, free hosts have [I]allow_url_fopen[/I] disabled (that's why the error message says "permission denied"). You may be able to use curl.
×

Success!

Help @jhonmaker spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...