Jump to content

svgmx5

Members
  • Posts

    301
  • Joined

  • Last visited

Everything posted by svgmx5

  1. I'm looking around to see if i can find a player that can play a live stream i have. Its in Rtmp format and is streamed from unreal media server. Anyone have any ideas? I've looked into jplayer but no luck there so far.
  2. Did you try contacting them? maybe they can give you a little more help if that's the case. Because i know that a php script needs to have the path to where the php is located at on the server in order to execute properly. Other than that, good luck, hopefully you find a solution
  3. I had this same issue a while back, what did the trick for me was to log if the web page was access at all by the cron job. The other thing you might want to do is add /usr/bin/php or find out where the php is located at, in my case it was that. If i'm correct the command should look something like this */5 0 *** /usr/bin/php /home/a9645958/djtimbutterfield.hostzi.com/tteeth/mailtest.php
  4. Hey everyone - Here's the issue that i'm having.... I have set up a player that streams the mp3 file via a php file so the url looks something like this "domain.com/stream.php?file=11222.mp3 The issue is that on chrome and on some other browsers (not all) the player cannot be replayed once the audio file is done nor can the user fast forward or back while the file is playing. Below is the code: $file = 'path to file'; if(file_exists($file)){ header('Content-type: audio/mpeg'); header('Content-Length: '.filesize($file)); header("Expires: -1"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); readfile($file); }else{ header("HTTP/1.0 404 Not Found"); } My question what is that i'm doing wrong that is causing this issue? i know it somewhere in there i just can't pin point it, any help is greatly appreciated Thanks!
  5. So i'm been tasked with this project for work. We are looking to see how we can build an interface where a user can click a button from a custom built web interface and call the number. This is similar to using the TAPI driver in outlook or the windows application dialer.exe, where they input the number, it calls their phone and then connects them to their destination number. I know there is the php COM object but that is only for windows php machines, ours is linux. So i'm just trying to find more information on how to go about it, if anyone here has done something similar then your help is greatly appreciated. Another thing we are trying to find about is if there is any software out there that we can use where a use inputs their phone number on a webpage and they click connect to call us. I've seen this used in some sites, i just don't know if there is something already out there or if we need to build this from scratch, if so then does anyone have any guides or links. I've been on google to see what i can find but so far nothing useful has come up. Again any help you guys have would be great
  6. No we haven't been able to fix this. We ended having to move it from a shared hosting to a Virtual Dedicated Hosting environment since it was working there.
  7. True that, but the way the site is set up is that the user has to log in to access the files. So i set it up in a way where it checks if the user has an active session along with a few more things in order to only allow the user who is already logged in access to stream the file. At this point that's the best i can do, i realize that nothing on the net is safe, but i feel that for the average user this will work for now. Of course if anyone else has any other suggestions on what else i can do i'm all ears
  8. Ok so i think i got this issue taken care off. What i did was put all the files outside the root folder and i created a PHP script to stream them. So now all i do is use the <audio> tag and use a url that looks like this "streamtest.phpf?file=file123.mp3" this seems to do the job for now.
  9. Ok, so my issue is the following: Currently the application i have has rules to access pages that look like this " locations/city-state-country" however all of the sudden this url no longer works and takes the user to either a page in the website but with out any styles or anything just blank or it returns a 404 error page. The code on my .htaccess file is the following <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteRule (.*)-(.*)-(.*)$ index.php?name=$1&state=$2&country=$3 Options +FollowSymLinks RewriteEngine on RewriteRule (.*)-(.*)$ index.php?name=$1&country=$2 </IfModule> This code had been working for the past year and half and like i said it has all of the sudden stop working. The site is hosted on GoDaddy on a shared hosting. I had contacted them and all i could get was that there was something on the scripting on the .htaccess file that was no longer working. I have looked over and over and i just can't figure out what it could be, so i'm hoping someone else can help me out with this. The Apache version on the server is 2.2. Also, i uploaded the whole site up to a different server with out making any modification to the files and it works just fine there. I know the apache version on the other server is 2.2.15. Not sure if this makes any difference. Also both servers are Linux servers. Again any help would be greatly appreciated. Thank you
  10. darn..that's what i was afraid off. Well thank you for the response eitherway
  11. The issue i'm having is that i have several audio files that i don't want to allow anyone else to gain access to them. Each file is in a separate folder inside a main folder, that i'll call "download" for now. So "download" has several other directories, and inside each directory are audio files. Those audio files are played with in a web app on the system. The issue is that right now anyone can type in the full address of the file "localhost.com/download/dir/file.mp3" and play the audio file. This is what i want to prevent from happening, i want those files to only stream when they are access or streamed from our application. I tried the following on the .htaccess file deny from all This just returned an 403 forbidden page, but i was unable to stream the file from the application RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)localhost.com/.*$ [NC] RewriteRule \.(mp3|wav)$ - [F] This just disabled the stream all together did not return a 403 or anything it just did not stream from neither the application or direct access Finally i'm using ajax to call the script that holds the files to be streamed, could this be the issue? are there any options i can use? Thanks in advanced
  12. Yes the date is in an integer format, and i believe the SQL is 5 Well what i ended up doing was just a BETWEEN Query. I found a site where i can convert a date into a UNIX time stamp and just search in between two values SELECT SUM(your row) FROM your_table WHERE your_row BETWEEN your_value AND your_value; If anyone has a different idea i'm open to hearing it Thanks
  13. I'm trying to search for some rows on one of my sql tables. I need to use the time stamp as the main search query, however the time stamp is saved as a unix time stamp. So the question is how do you do a search for results saved in October 2012 or 10-2012 with a Unix Time Stamp?
  14. I'm trying to test a connection via imap. however I keep getting a 500 error at times. Below is the example of the script that i use and this gets me a 500 error. The server is um.domainanem.com this is a Telinta PORTAUM system and their support said to use that as the server name. I have also tried adding um.domainanme.com:143 & um.domainname.com:143/imap $server = 'um.domainname.com'; $login = '12345656@um.domainname.com'; $password = '1234'; $connection = imap_open("{".$server."}", $login, $password); The weird thing is that when i use brackets on the server i get a 500 error, and if i don't use brackets i get nothing on the page. So with the example below i don't get an error, i just get a blank page. $connection = imap_open($server, $login, $password); I'm assuming that i need the brackets....anyways, if anyone can help me out that would be great or let me know if'm writing it correctly. Again thank you
  15. That's what i figured, but thought it be worth a shot asking. Anyways, thank you for your help i guess this has been resolved!
  16. can't believe it was this simple to do this. Just another question, while this is working fine, i was wondering if there was a way to remove the ',' at the end of the word after it makes the break. Right now the string shows up like: red, black, white, pink, orange Its not a huge deal but if possible i'd like to be able to remove the last ',' at the end of each line break.
  17. my issue is the following: I'm retrieving data from my database and putting the result data in an array. I then implode the array so each row of data has a "," at the end of it. The issue is that when i output this data it does not break as it should after it reaches the end of my block instead if keeps on going overlapping other blocks of data on my site. What i want to do and can't figure out is how can i split the data in rows based on a certain number of characters, but at the same time make sure that a word is not broken. So for example an string like : red, white, blue, pink, orange, black. I want this string to add a "<br/>" after it reaches a certain number of characters but make sure that a word is not broken. so i can have something like : red, white, blue, pink orange, black Instead of this: red, white blue, pink, ora nge, black I have tried using the CSS attribute of "word-wrap: break-word" but this just breaks the word as the above example. Anyways, i have placed my code below, hope someone can help me out. Thanks in advanced $array = array(); $i = 0; if($results!=0){ while($row = mysql_fetch_assoc($query)){ $array[] = $row['name'].' '; $i++; } echo implode(',',$array); }
  18. Not sure if this topic goes in here, it is related to PHP but also MySql, so if i'm on the wrong board sorry! What i'm trying to do is search for a keyword in 5 different tables and return the keyword ID from the table that its in The tables i'm trying to search are as follow location state county region continent The "location" table has all the locations i.e cities and each row has the following columns: id | continent_id | country_id | state_id | region_id | city_name The "state" table is set the the following: id | name "county" table : id | name "region" table: id | region and "continent" table id | name The way it works is the can search for any city or state or county or region or continent and ideally it should look into the five different tables and return the id of that table. So if the use searches for United States it will look for United States in all five tables, obviously it would find it in the "country" table so it should return that "id". The results are returned in "json format" Below is the code i have: <? $input = $_GET['keyword']; $data = array(); /* In this query i'm attempting to search in all databases, but i'm not sure if i'm doing this right. I'm not getting any results so i know something is wrong just don't know how to write it. */ $query = mysql_query("SELECT * FROM locations JOIN states ON states.id = locations.state_id JOIN countries ON countries.id=locations.country_id JOIN regions ON regions.region_id = locations.region_id JOIN continents ON continents.id=locations.continent_id WHERE name LIKE '$input%' OR state LIKE '$input%' OR region LIKE '$input%' OR country LIKE '$input%' OR continent LIKE '$input%'") or die(mysql_error()); /* Here the values are added to to the $json array. The "value" should be the "id" from the table that the keyword matched. The 'name' Should be the name of the actual keyword. Again if they search for United States the "id" will come from the "countries" table and the "value" would come from the "countries" table as the name */ while ($row = mysql_fetch_assoc($query)) { $json = array(); $json['value'] = $row['id']; $json['name'] = $row['name']; $data[] = $json; } header("Content-type: application/json"); echo json_encode($data); ?> Any help would he be appreciated, i don't want people to do it for me, but rather just guide me a little bit.
  19. So i was able to get this to work, all i had to do was the following changes <?php $sql = "SELECT term_id, tag_id FROM points_tags WHERE term_id IN('".implode("','", $tagArr)."')"; $res = mysql_query($sql); $results = mysql_num_rows($res); if($results !=0){ $groups= array(); $h = 0; while ($row=mysql_fetch_assoc($res)){ if (!isset($groups[$row['tag_id']])){ $groups[$row['tag_id']]=array(); } $groups[$row['tag_id']][] = $row['term_id']; } $hasAll=array(); sort($tagArr); foreach ($groups as $tag=>$terms){ sort($terms); if ($terms == $tagArr){ $hasAll[] = $tag; $h++ } } } ?> Thanks to everyone for the help!
  20. well if it has to be used...what could be the alternative? is there one?
  21. So i'm having some sort of an issue. what i'm trying to do is to get the name from an URL using GET that includes the "&" symbol. I have a link and that link looks like this: name_of_company_&_member. What im trying to do is to get that whole line using Get and echoing on a page. The problem is that the line cuts off after "company_" because it reads the & symbol as something different. Does anyone know how i can be able to retrieve the whole line including everything after the & symbol? i tried using the special character "%26" but i still get the same result.
  22. It would help to note that not all results are actually showing up. At first i thought it was not showing up results if i searched for more than 2 terms, but after testing and playing with it more, i'm realizing that it doesn't matter the number of results, for some reason not all the results are been added to the "hasAll" array even though they match the $tagArr array. Still not sure why though...
  23. Hey again, Sorry i never replied back to this post, went out on vacation and well just got back this past weekend. Anyway, @kicken - i tried your method, and it worked! but!!...i'm still have some issues.... While @kicken methods worked for some reason it's only working when i search for two terms or less...i've tried searching for a third term or more and i just get no results at all.. Any ideas on why? I've been breaking my head for the past several weeks and i just can't figure it out....
  24. @Drummin: Your method worked, even though i created a smaller version of that... My next problem though is that using OR i'm still getting all terms that contain either value, however when i switch to using AND i get no results The problem is that i want to get results with those exact values, so again, say i have the following table and the terms i'm looking for are "red" and "black": Item term car red car black boat red bike red boat black boat pink Like previously stated, i need to able to grab boat and car only, because only those two items contain the term red and black. Using OR i get all three items even though bike does not contain the term black. But if used AND i get nothing... I have checked the table to make sure the terms i'm looking for actually exist and they do yet i get no results when using AND. Any ideas?
  25. So my question is the following: i have a form where the user can search for multiple terms (green, red, black, orange etc) the terms are seperated by a coma when the form is submitted and then those terms are placed in an array. I then make for values matching those terms, using the following script: //$tagArr = array(red, black); $makeQuery = mysql_query("SELECT * FROM points_tags WHERE tag_id IN('".implode("','", $tagArr)."')"); $num_results = mysql_num_rows($makeQuery); The table "point_tags" containts two columns one that has that holds a value id and the other holds the term, a value can have multiple terms so it looks kinda like this: tag_id term_id car red car black boat orange plane black You get the idea right? Anyway the current query is grabbing all values matching those terms in. However what i want to get done is grab the values that have those exact terms only, so in theory something similar to the following: $makeQuery = mysql_query("SELECT * FROM points_tags WHERE tag_id="term1' AND tag_id='term2'"); Where if i search for red and black i only get car returned because car has both the terms red and black, while plane has black it does not contain the term red. Does that make sense? I've been trying to figuring this out myself for a while already and i just can't think of a way to do this. I hope someone here can help me out EDIT::: What i meant to accomplish with the second query example was that i need to accomplish that same type of task (or using OR ) but while keeping the values in an array, so again in theory that (tag_id='term1' AND tag_id='term2') would just keep incrementing based on the number of values i'm searching for, so if there is only one value been searched for then there would not be any "AND". The AND or OR would get added if there are more than one value. Make sense what i'm talking about?
×
×
  • 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.