| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | Script needs editing - quick work - paid Hey guys, i need someone to alter a voting script I have. My site, www.unsigned.fm has a media Player on it (click on 'tune in' in the red and white stripy box) and people can vote for the songs on it they like by pressiing the vote button (circle button with red star in it). This is the voting script that I got with the Media Player. As you can see at the moment it only collects the last vote recieved. I need it to collect and add up each vote so I can see which songs have the most at the end of each month. Can anyone do this? Please reply here or PM me with a price asap Thanks, Rob <?php ///////////////////////////////////////////////////////////////// // // // // // // // The following is for testing only: // // To test this script, create a text file and set the // permissions on the file to 777 (read-write-all). // The text file should reside in the same folder as // this script. The result of the test should write the // returned values from the vote to the file. // Enter the name of the file that should record the information here: $testFile = "test.txt"; // NOTE: The permissions on this file must be sett to 777 (read-write-all) // NOTE: This test file will only record a single vote. This script // is intended to provide you with an example of how to read the infromation // returned from the player. It is up to you to develop a script that will store // the retuned information as you see fit. // The player will include "action" -- which is set to "vote" in the URI, // so that you can differentiate calls from the player from those who might // try and access this script directly. if($_REQUEST['action']=="vote"){ function writeTextFile2($theFileName, $theContent, $openCondition='w+'){ if($theContent=="" || is_null($theContent)){ $enterContent = " "; } else { $enterContent = $theContent; } $retval = TRUE; if (!$fp = fopen($theFileName, $openCondition)) { $retval = FALSE; } if($retval){ if (!$filewrite = fwrite($fp, stripslashes($enterContent))) { $retval = FALSE; exit; } else { $retval = TRUE; } } @fclose($fp); return $retval; @chmod ($theFileName, 0777); } // NOTE: Some PHP installations may use a different nomenclature for the "$_REQUEST" such as "$_HTTP_SERVER" $theContent = ""; // Here we are extracting all of the info contained in the request. foreach($_REQUEST as $key => $value){ $theContent .= $key." : \t".urldecode($value)."\r\n"; } strstr( PHP_OS, "WIN") ? $slash = "\\" : $slash = "/"; //print "$testFile"; if(writeTextFile2(getcwd ().$slash.$testFile, $theContent, 'w+')){ print "&retval=ok"; } else { print "&retval=error"; } // // // // // // ///////////////////////////////////////////////////////////////// } ?> Oh and if it helps, this is the test.txt file that it talks about at the moment after a vote has been made : action : vote visual : bitrate : 128 filesize : 4.1 seconds : 256.3134375 genre : comments : / track : title : The Mosaics - Runner album : artist : Mosaics - Runner filename : http://www.unsigned.fm/mp3s/Mosaics - Runner.mp3 entity : m flashlistID : 11 PHPSESSID : 8ef9b9f97c1dcdb8f26109aa6fe4a271
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes Last edited by evermore2000; 08-28-2006 at 11:10 AM. |
| |
| | #2 (permalink) |
| NamePros Regular | Thanks for the replys. PMs replied to. Anyone else? As I would like to get this done asap Thanks Rob
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes |
| |
| | #3 (permalink) |
| NamePros Regular | I still need this done guys. It should be a simple bit of quick work. Please reply asap. Many Thanks
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes |
| |
| | #4 (permalink) |
| NamePros Regular | Still looking for someone. Anyone?
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes |
| |
| | #5 (permalink) |
| NamePros Regular | Last chance guys - come on, its not a big job, there must be someone that can do it
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes |
| |
| | #7 (permalink) |
| NamePros Regular |
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |