[advanced search]
 

Go Back   NamePros.com > Marketplace > Web Development > Web Development Wanted

Web Development Wanted Requests for websites, templates, custom programming, logos or graphics.


Closed Thread
 
LinkBack Thread Tools
Old 07-24-2006, 02:59 PM   #1 (permalink)
NamePros Regular
 
evermore2000's Avatar
 
Join Date: Mar 2006
Posts: 291
2.00 NP$ (Donate)

evermore2000 is on a distinguished road


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 :

Last edited by evermore2000; 07-25-2006 at 03:58 AM.
evermore2000 is offline  
Old 07-25-2006, 03:58 AM   #2 (permalink)
NamePros Regular
 
evermore2000's Avatar
 
Join Date: Mar 2006
Posts: 291
2.00 NP$ (Donate)

evermore2000 is on a distinguished road


anyone?
evermore2000 is offline  
Old 07-25-2006, 09:46 AM   #3 (permalink)
Account Closed
 
Join Date: Sep 2005
Location: Romania
Posts: 492
121.10 NP$ (Donate)

softgroups will become famous soon enoughsoftgroups will become famous soon enough


Yes, i can help you with that , please e-mail me at : bogdan@softgroups.com along with all your Yahoo/MSN messenger id, etc
softgroups is offline  
Old 07-25-2006, 12:00 PM   #4 (permalink)
NamePros Regular
 
evermore2000's Avatar
 
Join Date: Mar 2006
Posts: 291
2.00 NP$ (Donate)

evermore2000 is on a distinguished road


thanks,

Email sent
evermore2000 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 04:12 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85