|
Install unzip
# apt-get install unzip Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
We have a in-house channels of Movies. We want to play ads in that channel. The ads can be a:
1) standalone ad
2) A strip (like news headlines in various channels)
3) An L-shaped ad (like shown in some sports channels)
these ads will be in swf/avi/wmv/mp4 etc formats.
In addition, we want to have a scheduler for playing movies(basically a queue)/ads(managed on timely based)/Logo(for the in-house channel i.e an image or an animated image or video format).
How to build a player with these requirements for linux?
looking forward for your kind response... 
|
|
|
|
|
Hi all,
I have inserted an image in the MySQL database with the coloum name image and datatype as longblog.
But now the problem is i want to display it on the form using html control in the php.
How can i do it ?
Thanks in advance.
|
|
|
|
|
You need to point your img tags at a script that loads the image from the database, something like:
<img src="image.php?id=1" alt="Image 1" />
Then image.php should load the image from the database, add the Content-type: header and output the image data.
|
|
|
|
|
i want how to read specific tag in php code like
<name>xyz
<id>1
<state>x
<name>acv
<id>2
<state>cd
where state=x
|
|
|
|
|
sorry your question is a bit vague...by specific tag do you mean you are parsing a file with php?
If so look at the php functions file_get_contents(), explode() and strpos()
|
|
|
|
|
How to redirect from croj job ?
It is not working form cron job header("Location:http://abc.com");
|
|
|
|
|
You are more than likely outputing stuff to the browser before you set the header (redirect), which isn't allowed (read the docmentation[^]).
You should also call exit; after you set a redirection header (also described in the documentation), to make sure the script is stopped.If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
|
hii all
i like "sponsorennetzwerk" but sponsorennetzwerk language german i don't understand
i have contacted support" sponsorennetzwerk" only provided language german
cant you help me translate
<a href="http://sourceforge.net/projects/sponsorennetzw/">http://sourceforge.net/projects/sponsorennetzw/</a>[<a href="http://sourceforge.net/projects/sponsorennetzw/" target="_blank" title="New Window">^</a>]
|
|
|
|
|
have you tried google translate?
|
|
|
|
|
Hi,
I have inserted data with double quote in the MySQL database but,while retrieving i.e., displaying it to textbox the value is not coming.
How to do it ?
Thanks in advance.
|
|
|
|
|
Whenever you output something from the database, use htmlentities($value)[^] to replace the quotes with " .
|
|
|
|
|
Hi all,
I am new to PHP.Can any one tell me how the postback works in php.
Thanks in advance.
|
|
|
|
|
|
here is an example that I found in php tutorials
<br />
< ? php<br />
<br />
require_once( "icepay.php" );<br />
$icepay = new ICEPAY( 10000, "ABcdEFgHIJklmNOPQrSTUvwXyZ" );<br />
if ( $icepay->;OnPostback() )<br />
{<br />
$data = $icepay->;GetPostback();<br />
switch ( strtoupper($data->status) )<br />
{<br />
case "OK":
break;<br />
case "OPEN":
break;<br />
case "ERR":
break;<br />
case "REFUND":
break;<br />
case "CBACK":
break;<br />
}<br />
}<br />
<br />
?> <br />
<br />
|
|
|
|
|
Hi everybody,
I was implementing an image gallery from one of tutorials. In this tutorial PHP opens a directory and loops through it and outputs all image files. I am looking for code solution how to change this loop to output only those images that belongs to particular image album. There should be way to run SQL query and select files and then output them, problem is I have no idea how.
When I upload image I store some data to following table:
CREATE TABLE tbl_image (
im_id INT NOT NULL AUTO_INCREMENT,
im_user_name VARCHAR(25) NOT NULL,
im_album_id INT NOT NULL,
im_title VARCHAR(64) NOT NULL,
im_description TEXT NOT NULL,
im_type VARCHAR(30) NOT NULL,
im_image VARCHAR(60) NOT NULL,
im_date DATETIME NOT NULL,
PRIMARY KEY(im_id)
);
here is the code piece that should be changed:
<?php
$thumb_directory = 'img/thumbs';
$orig_directory = 'img/original';
$stage_width=600;
$stage_height=400;
$allowed_types=array('jpg','jpeg','gif','png');
$file_parts=array();
$ext='';
$title='';
$i=0;
$dir_handle = @opendir($thumb_directory) or die("There is an error with your image directory!");
$i=1;
while ($file = readdir($dir_handle))
{
if($file=='.' || $file == '..') continue;
$file_parts = explode('.',$file);
$ext = strtolower(array_pop($file_parts));
$title = implode('.',$file_parts);
$title = htmlspecialchars($title);
if(in_array($ext,$allowed_types))
{
$left=rand(0,$stage_width);
$top=rand(0,400);
$rot = rand(-40,40);
if($top>$stage_height-130 && $left > $stage_width-230)
{
$top-=120+130;
$left-=230;
}
echo '
<div id="pic-'.($i++).'" class="pic" style="top:'.$top.'px;left:'.$left.'px;background:url('.$thumb_directory.'/'.$file.') no-repeat 50% 50%; -moz-transform:rotate('.$rot.'deg); -webkit-transform:rotate('.$rot.'deg);">
<a class="fancybox" rel="fncbx" href="'.$orig_directory.'/'.$file.'" target="_blank">'.$title.'</a>
</div>';
}
}
closedir($dir_handle);
?>
any thoughts or suggestions are appreciated.
Thanks
|
|
|
|
|
You need to read image names from database instead of scanning the directory, using a query like:
SELECT * FROM tbl_image WHERE im_album_id = XXX
Reading a basic PHP/MySQL Tutorial[^] will help.
|
|
|
|
|
I do understand that bit, but how to output query results the same way as they are in while loop?
|
|
|
|
|
wartotojas wrote: how to output query results the same way as they are in while loop?
Many of the most basic tutorials demonstrate this. This Tizag Tutorial[^] is a good example.If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Problem solved, thanks for suggestions everybody 
|
|
|
|
|
anybody pls suggest me how to write code for device drivers in linux.. i ve no idea abt programming those.. if any body has code for the device drivers pls give me 
|
|
|
|
|
Your question implies you are not sure what a device driver does. I suggest you take a look here[^] for help, and be prepared for a lot of hard work. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Read the book[^] first.
The code of Linux device drivers is available here[^].
|
|
|
|
|
how to open and read .zip file in php example :-"http://www.nseindia.com/content/historical/EQUITIES/2010/FEB/cm03FEB2010bhav.csv.zip".
which function need to use.
|
|
|
|