Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
eddyy93 каза:Хмм, искаш да пуснеш клипчета от vbox7 (които линкове са записани в базата ти данни от потребителите) или потребител да качва обикновени .avi, .mpeg и т.н. - клипчета на твоят хост и ти да ги стартираш ?
function send_load_post($Host, $Uri, $SendVars) {
$Result = array();
$ContentLength = strlen($SendVars);
$ReqHeader = "POST $Uri HTTP/1.1\n" . "Host: $Host\n" . "Content-Type: application/x-www-form-urlencoded\n" . "Content-Length: $ContentLength\n\n" . "$SendVars\n";
$socket = fsockopen($Host, 80, &$errno, &$errstr);
if (!$socket) { $Result["errno"] = $errno; $Result["errstr"] = $errstr; return false; }
$idx = 0;
fputs($socket, $ReqHeader);
while (!feof($socket)) { $Result[$idx++] = fgets($socket, 128); }
return $Result;
}
$Post = send_load_post('www.vbox7.com', 'http://www.vbox7.com/play/magare.do', 'vid=' . $vid);
foreach($Post as $Row) {
if(preg_match('/&videoFile=(.*)&/i',$Row,$found)){
$url = $found[1];
break;
}
}
echo "Адреса: <a href=\"$url\">$url</a> </b>";
<?php
function send_load_post($Host, $Uri, $SendVars) {
$Result = array();
$ContentLength = strlen($SendVars);
$ReqHeader = "POST $Uri HTTP/1.1\n" . "Host: $Host\n" . "Content-Type: application/x-www-form-urlencoded\n" . "Content-Length: $ContentLength\n\n" . "$SendVars\n";
$socket = fsockopen($Host, 80, &$errno, &$errstr);
if (!$socket) { $Result["errno"] = $errno; $Result["errstr"] = $errstr; return false; }
$idx = 0;
fputs($socket, $ReqHeader);
while (!feof($socket)) { $Result[$idx++] = fgets($socket, 128); }
return $Result;
}
$query = mysql_query("SELECT *, users.id AS `username_id` FROM clips, users WHERE clips.author=users.username ORDER BY clips.klik DESC LIMIT 0, 1") or die(mysql_error());
if(mysql_num_rows($query) > 0) {
while ($row = mysql_fetch_assoc($query)) {
$Post = send_load_post('www.vbox7.com', 'http://www.vbox7.com/play/magare.do', 'vid=' . $row['vid']);
foreach($Post as $Row) {
if(preg_match('/&videoFile=(.*)&/i',$Row,$found)){
$url = $found[1];
break;
}
}
echo "
<hr />
<br /><a href=\"profila.php?id={$row['username_id']}\">{$row['username']}</a>
<br /><img src='{$row['avatar']}' width='10px' height='10px' /><br />
<br />{$url}<br />\n";
}
} else {
echo "няма намерени резултати.";
}
?>