Jump to content

heminfotech

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

heminfotech's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi Guys I need a Help Please. I have a weired problem of uploading the video and converting it to flv. I have a script written where first the original file get uploaded and then get converted into FLV file and the image for the same is extracted from the video. Please have a look at below code. when I submit the form the form start executing this code. Once the code started it uploads all the three above given file and they are converted very well so there is no issue for the same. But after that it goes into comma like status and shows the dialog in the attached image. <?php include_once("db.php"); include_once("dbcon.php"); session_start(); function GetExt($Filename) { $Extension = explode(".", $Filename); $Extension_i = (count($Extension) - 1); return $Extension[$Extension_i]; } // How to use it if(isset($_POST) && isset($_FILES)) { $title=$_POST['title']; $desc=$_POST['desc']; $keywords=$_POST['keywords']; switch ($_POST['category']) { case 1: $imgcat = "animals/pets"; break; case 2: $imgcat = "people"; break; case 3: $imgcat = "travel"; break; case 4: $imgcat = "children"; break; case 5: $imgcat = "sports"; break; case 6: $imgcat = "nature"; break; case 7: $imgcat = "action"; break; case 8: $imgcat = "humor"; break; case 9: $imgcat = "portraiture"; break; case 10: $imgcat = "other"; break; } if(isset($_FILES['videofile']['name'])) { ini_set("post_max_size", "25M"); ini_set("upload_max_filesize", "25M"); ini_set("memory_limit", -1 ); ini_set("max_input_time", -1); set_time_limit(0); $vid_file=str_replace(" ","_",$_FILES['videofile']['name']); if(!empty($vid_file)) { $ext=GetExt($vid_file); $flv_filename=substr($vid_file,0,(strlen($vid_file)-strlen(GetExt($vid_file))-1)); $imgpath=$flv_filename.".jpg"; $flv_filename.=".flv"; if($_FILES['videofile']['type']!="video/mpeg" && $_FILES['videofile']['type']!="video/x-msvideo" && $_FILES['videofile']['type']!="video/vnd.mpegurl" && $_FILES['videofile']['type']!="video/x-ms-wmv" && $_FILES['videofile']['type']!="video/x-ms-asf" && $_FILES['videofile']['type']!="video/x-flv" && $_FILES['videofile']['type']!="video/quicktime" && $_FILES['videofile']['type']!="video/x-ms-wvx") { $msg="Image File must be mpeg, mpg, mpa, avi, m4u, wmv, wmv3, asx, flv, mov, wvx!!!"; header("Location: index.php?q=video_upld&msg=$msg"); exit(); } /*if($_FILES['videofile']['size']>102400){ $msg="Your file exceeded to 100 KB !!!"; header("Location: index.php?q=video_upld&msg=$msg"); exit(); } */ $add = "video/".$vid_file; if(move_uploaded_file($_FILES['videofile']['tmp_name'], $add)) { echo "uploaded sucessfully"; } else { echo "Unsuccessful"; } chmod("$add",0777); exec("ffmpeg -i ".$vid_file." -b 100k -ar 22050 -y video/".$flv_filename); exec("ffmpeg -i ".$vid_file." -an -ss 00:00:10 -r 1 -vframes 1 -f mjpeg -y video/".$imgpath); } $type=$_FILES['videofile']['type']; $size=$_FILES['videofile']['size']; //print_r($_POST); //print_r($_FILES); $t=time(); $ins_video="insert into `pixyak`.`video` (title, description, member, keywords, category, type, size, flvpath, path, imgpath, ext, cre_dt, mod_dt, status) values ('$title', '$desc', '".$_SESSION['user_name']."', '$keywords', '$imgcat', '$type', '$size', '$flv_filename', '$vid_file', '$imgpath', '$ext', '$t', '$t', 'Active')"; //echo $ins_video; mysql_query($ins_video); if(mysql_affected_rows()==1) { $insId=mysql_insert_id(); if ($_POST['around']){ $country=addslashes($_POST['country']); $city=addslashes($_POST['city']); $desc1=addslashes($_POST['desc1']); mysql_query("insert into world_vid values ('','".$insId."','".$_SESSION['user_name']."','','".time()."','0','".addslashes($title)."','".$desc1."','".$country."','".$city."',0,0,0)"); } $msg="Video Uploaded Successfully"; header("location: index.php?q=video_upld&msg=$msg"); die(); } else { $msg="Error: ".mysql_error(); header("location: index.php?q=video_upld&msg=$msg"); die(); } //ob_flush(); } } else { //ob_flush(); $msg="Access Denied"; header("location: index.php?q=video_upld&msg=$msg"); die(); } ?> And I am also attaching the image of the dialog box too. Please help me I can't understand y it gets Stuck with the same. Thanks very much for all your support
  2. Hey Thanks Will Wait for the same.... Regards Hemal Jivani
  3. Hi Any one know about the script that can be easily integrated like GMAIL CHAT. If its open source then it will be great...... Thanks for all your support. Regards Hemal Jviani
  4. Hi Friends Whats up?? I have one issue I try to find out the script for tagging images means you can say like identifying the people in a particular image. That is possible and is done in javascript, The examples for this are available at dostpost.com, facebook.com etc... This script will help you to create a square around the image and on creating this it will allow you to tag that picture with the person name or whatever...... Once this is done whever you display this on the front and move your cursor on the person it will show you the name of the persona and in the same way there will be a line below mentioning in this photo a,b,c when you put your cursor on a it will display a square against the picture where tag a was given. I need a script on this if anyone can help I try to find out a lot but I am not able to locate the same. Thanks & regards Hemal Jivani.
  5. Hi Please find all the things that you need AJAX REQUEST // JavaScript Document function createRequest() { try { request = new XMLHttpRequest(); } catch (trymicrosoft) { try { request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (othermicrosoft) { try { request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (failed) { request = false; } } } return request; } function getStates(val){ getStateReq = createRequest(); //alert(document.getElementById("arrid").value); if(val==2) { id = document.getElementById("country").value; tag='country'; var url = "findstate.php?__=" + encodeURIComponent((new Date()).toString()) +"&cnt_id="+id+"&val="+val; getStateReq.open("GET", url, true); getStateReq.onreadystatechange = getStateRes; getStateReq.send(null); } else { if (val==0) { //alert(document.getElementById("country").value); id = document.getElementById("country").value; tag='country'; } else { id = document.getElementById("country1").value; tag='country1'; } var url = "findstate.php?__=" + encodeURIComponent((new Date()).toString()) +"&cnt_id="+id+"&val="+val; //alert(url); getStateReq.open("GET", url, true); getStateReq.onreadystatechange = getStateRes; getStateReq.send(null); } } function getStateRes(){ if (getStateReq.readyState == 4) { //alert(getStateReq.status); if (getStateReq.status == 200) { var resGetState=getStateReq.responseText.split("!@#$%%$#@!"); if (resGetState[1]==1) { document.getElementById("addDetails1").innerHTML=resGetState[0]; } else { document.getElementById("addDetails").innerHTML=resGetState[0]; } //document.getElementById("addDetails").style="visibility:visible"; } } } REQUESTED PAGE CODE <? include_once 'functions.php'; include_once'config.php'; $cnt_id=$_REQUEST['cnt_id']; $getCntNm=mysql_fetch_array(mysql_query("select * from countries where name='$cnt_id'")); $rs=mysql_query("select * from states where Country=".$getCntNm['id']); ?> <table width="100%"> <tr> <td ><? if($_REQUEST['val']==2) { if(mysql_num_rows($rs)>0) { ?> <select name="state" class="contentfont" id="state" > <option value="-1" > </option> <? while ($staes = mysql_fetch_array($rs)) { echo "<option value=\"".$staes['Name']."\" ".(($staes['Name']==$_POST['state'])?"selected":"").">".$staes['Name']." </option>"; } ?> </select> <? } else { ?> <input type="text" name="state" id="state" size="30" /> <? } } else { if(mysql_num_rows($rs)>0) { ?> <table width="100%" height="143" cellpadding="0" cellspacing="0"> <tr> <td align="right" ><span class="style15"> *Street Name & Number: </span> </td> <td><input type="text" name="street" id="street" size="30" /></td> </tr> <tr> <td align="right" ><span class="style15">*Town or City : </span></td> <td><input type="text" name="city" id="city" size="30" /></td> </tr> <tr> <td align="right" ><span class="style15">*Province or State : </span></td> <td><select name="state" class="contentfont" id="state" > <option value="-1"> </option> <? while ($staes = mysql_fetch_array($rs)) { echo "<option value=\"".$staes['Name']."\" ".(($staes['Name']==$_POST['state'])?"selected":"").">".$staes['Name']."</option>"; } ?> </select></td> </tr> <tr> <td width="38%" align="right"><span class="style15">Other: </span></td> <td width="59%"><input name="otherstate" type="text" id="otherstate" size="28" /></td> </tr> <tr> <td align="right" ><span class="style15">*Postal or Area Code : </span> </td> <td><input type="text" name="zip" id="zip" size="30" maxlength="6" /></td> </tr> </table> <? } else { ?> <table width="100%" height="143" cellpadding="0" cellspacing="0"> <tr> <td width="38%" align="right" ><span class="style15">*Street Name & Number: </span> </td> <td width="59%"><input type="text" name="street" id="street" size="30" /></td> </tr> <tr> <td align="right" ><span class="style15">*Town or City : </span></td> <td><input type="text" name="city" id="city" size="30" /></td> </tr> <tr> <td align="right" ><span class="style15">*Province or State : </span> </td> <td><input type="text" name="state" id="state" size="30" /></td> </tr> <tr> <td align="right"><span class="style15">Other: </span></td> <td ><input name="otherstate" type="text" id="otherstate" size="28" /></td> </tr> <tr> <td align="right" ><span class="style15">*Postal or Area Code : </span></td> <td><input type="text" name="zip" id="zip" size="30" maxlength="6" /></td> </tr> </table> <? } } ?> </td> </tr></table> Thanks for all your support. Hope this will help. If you need something else let me know Regards Hemal Jivani
  6. Hi Everyone I have a critical Issue I am not able to find solution on this. I have one registration for where on selecting countries the rest of details like street no & name zip state city etc is coming. so i am getting the data and replacing it through AJAX request. I am not able to find the data when I post the same form it gives me error like this [b] This is the array I am getting[/b] email => abc@abcd.com amt => 49.98 password1 => hemal cnfPass => hemal paypal_id => hemal.jivani@gmail.com que => hemal ans => Hemal day => 4 month => 6 artistname => Hemal firstnm => ASDF lastnm => ASDF country => Austria phone => 123456789 url => http://pidex.ca/ gender => M gmail => 1 [b]This is the errors I am getting. I have already compared the names of the fields please don't give such an answer. It works in some of the pages and not in some. [/b] Notice: Undefined index: street in D:\work\WQM\artistsignupstep3_a.php on line 20 Notice: Undefined index: city in D:\work\WQM\artistsignupstep3_a.php on line 21 Notice: Undefined index: state in D:\work\WQM\artistsignupstep3_a.php on line 23 Notice: Undefined index: otherstate in D:\work\WQM\artistsignupstep3_a.php on line 29 Notice: Undefined index: zip in D:\work\WQM\artistsignupstep3_a.php on line 32 Notice: Undefined index: newsletters in D:\work\WQM\artistsignupstep3_a.php on line 45 Is there anyone who can help me on this or may be have some solution on this. Thanks for all your helps in advance Regards Hemal Jivani
  7. Hello Guys Does Any one Knows regarding any free or paid web based tools to convert PDF and PowerPoint files to flash. I am not able to find web based solution. Please help me Thanks for all your support. Regards Hemal Jivani
  8. Hi I would like to update the status of users of my site. I am not getting any clue as to how execute a script on close event of the browser. I have tried one thing that is I have used to call popup to execute it on unload of the page. there are 2 problems that window.open() is not working firefox and also I have to make the changes to more than 100's of pages. So Please if anyone has Idea or can help me It will be aprreciable. Thanks for all your support Regards Hemal Jivani
  9. Hi I have two domains and I would like to access the database of Domain No. 1 on Domain No. 2. Is that possible and if possible any link to go through or some suggestion how to do using PHP Thanks For all your support. Regards Hemal Jivani
  10. Thans Steve I will see to it thanks very much.. Thanks for all your support
  11. Thanks steve but this is one way shopping cart. I need ebay like 2 way shopping cart. Thanks for all your support. Thanks & Regards Heminfotech
  12. Hi NO I don't think that its a simple script but I want to simply convey is that I want a shopping cart that has a similar functionality means there can be a seller who can register & a buyer who can also register. I don't want exact ebay clone. I need a similar functionality script. so that it will ease my task of creating a shopping cart Thats all . all other modification needed will be done by me... Thanks for all your support Thanks & regards Heminfotech.
  13. Hi, Anyone have Idea about free PHP script which is exactly like a e-bay where seller & buyer comes together & sale/buy their products. etc.... Please its urgent Thanks for all your support. Thanks & Regards Heminfotech
  14. Hi, Anyone have Idea about free PHP script which is exactly like a e-bay where seller & buyer comes together & sale/buy their products. etc.... Please its urgent Thanks for all your support. Thanks & Regards
  15. I have this above values. This are pixel sizes. I need megapixel. does it make some sense if not then let me know I will try to explain it again. In very short I need megapixel of any image.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.