|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
A free project - I need help with
Here is my progect!
I have a page that gets queried by a remote server and then prints a response that is determined by a message. Here is what the server sends to my page: www.my-spot.co.za/sms.php?message=GIGS AKM&from=27834190862 The "message" has a pre defined set of responses. and "from" is a number that needs to be stored in a .txt file Here is the script: (BTW it works fine!) <?php $usermsg = strtoupper( $_GET["message"] ); $phonenumber = $_GET["from"]; $response = ""; switch( $usermsg ) { case "GIGS AKM" : $response = "The next AKM gig is Thunder Road Rock Diner cnr Tenth Ave and Florida Road Dbn on Friday 17 November Unplugged free entrance. Supplied by www.get-mine.co.za"; break; case "GIGS WC" : $response = "BATTLE OF THE BANDS NATIONAL FINALS, 19 november at EMPERORS PALACE Jhb. Supplied by www.get-mine.co.za"; break; case "GIGS Mea" : $response = "This is the Mea gig guide. Mea's next gig is at Burn, Durban - Fri 17th Nov"; break; case "GIGS Cubic" : $response = "This is the Cubic Inch gig guide. This will be updated in the next few days please try again soon"; break; case "GIGS C22" : $response = "Sunday 26th Nov Barts Tavern, Strand 3 – 7pm, December: 1st Geko Bar Hermanus 10pm onwards, 3rd Dec Barts Tavern, Strand 3 – 7pm, 6th Dec Barts Tavern, 8:30pm"; break; case "GIGS 33" : $response = "This is the response for the band 33"; break; default : $response = "ERROR INVALID KEYWORD PLEASE CHECK YOUR SPELLING OR TRY AGAIN! Please report errors to 0834190862"; break; } /* Now we just want to write a log of what was requested by whom, and record the date and time */ $timestamp = date("Y-m-d H:i:s"); $myFile = "sms_request_log.txt"; $fh = fopen($myFile, 'a'); $stringData = "$timestamp, $usermsg, $phonenumbern"; fwrite($fh, $stringData); fclose($fh); echo $response; ?> Now what I want to do is make a data base that I can keep all the responses in. Also I want to make a page that will input data into the database. Now this whole script is governed by keywords EG: "GIGS AKM" I want people to be able to add a keyword with the prefix of GIGS and be able to update thier responses. This is an information service that I offer to bands in South Africa for free. It is a text service, a person sends a message eg "GIGS AKM" to the number 34110 and then the sms server queries my page and then sends the sms server takes the response and sends it to the phone. Can you guys help make the code for this project?? I'm too new to PHP to tackle it by my self. Why2k |
|
#2
|
||||
|
||||
|
RE: A php challenge
Are you looking for someone to code it for you?
|
|
#3
|
|||
|
|||
|
RE: A free project - I need help with
Yeah I am looking for somebody to code it for me.
I am not clever enough to do it myself. Also I will need a login and password system for it too. I am busy learning php but I have just started so this project is way to tough for me to handle! Thanks for the reply and I hope that somebody will take time to help me! Why2k |
|
#4
|
|||
|
|||
|
Message Moved
Thread moved from 'PHP Coding' to 'Barter Zone' by lig.
Reason: |
![]() |
| Viewing: Codewalkers Forums > General > Barter Zone > A php challenge |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|