| |||||||
| Web Development Wanted Requests for websites, templates, custom programming, logos or graphics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | Bit of php work - Paid Hi, I have a media player on my website which has a 'voting' option on it allowing visitors listening to a song to vote for it. The most voted for artists will play a showcase gig each month. This is the voting script below. As it is now it just records 1 vote. If you read the first paragraph you'll get the idea. My site is www.unsigned.fm if you wanna have a look at the media player. Everything came from www.wimpyplayer.com. Can anyone help please? I need it to record all the votes. Please reply here or PM me with prices. Many 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"; } // // // // // // ///////////////////////////////////////////////////////////////// } ?> This is what the test.txt file looks like as it is now : action : trackPlays flashlistID : 4 entity : m filename : http://www.unsigned.fm/mp3s/Evermore - No Escape.mp3 artist : title : Evermore - No Escape comments : visual :
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes Last edited by evermore2000; 07-25-2006 at 03:58 AM. |
| |
| | #2 (permalink) |
| NamePros Regular | anyone?
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes |
| |
| | #3 (permalink) |
| Account Closed | Yes, i can help you with that , please e-mail me at : bogdan@softgroups.com along with all your Yahoo/MSN messenger id, etc |
| |
| | #4 (permalink) |
| NamePros Regular | thanks, Email sent
__________________ [B] TitanReview.com - Titan Poker Review & Bonus Codes |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |