I Need Help With A PHP Script

A Member? Please Login  
type your username and password to login
Date: July 26, 2008, 10:59 AM
223767 members and 127075 Topics
Latest Member: ify24
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming  |  I Need Help With A PHP Script
Pages: (1) (2) Go Down Send this topic Notify of replies
Author Topic: I Need Help With A PHP Script  (Read 1221 views)
qleyo (f)
Re: I Need Help With A PHP Script
« #32 on: March 01, 2006, 11:58 AM »

Right I happen to have 3 years experience with PHP, and alot more in C/C++ which is what PHP tries to emulate, but like SBU has said what exactly is your problem, and like he has said knowing and understand a problem is one of the major pitfalls of software engineering today. Its hard to tell you what to do when I don't know what you want,
alexis (m)
Re: I Need Help With A PHP Script
« #33 on: March 01, 2006, 09:33 PM »

qleyo - He said he wants to a random quote generation script using text files or back-ended. He wanted one of us to write the code for him which most people on this thread is trying not to do, I reckon perhaps to allow him get his hands wet first.

I told him I would do it for him but if he does not the script, he should but a clear link on his site back to my own site.
sbucareer (m)
Re: I Need Help With A PHP Script
« #34 on: March 02, 2006, 12:53 AM »


That is fair enough
pojutime (m)
Re: I Need Help With A PHP Script
« #35 on: March 12, 2006, 12:54 PM »

Hi guys,

Thanks for all the replies.
What i want is quite easy. I wonder why you guys have been unable to understand it. I want to place a link on  a page. When a visitor clicks on the page, it will open a pop-up window. QUite easy thus far, abi? Ok when the pop-up window opens, the content it will display should be taken from a text file. After 24 hours and the link is clicked again, the pop-up should display content from the next (sequentially) not randomnly text file. And on an on like that.

Cheers
alexis (m)
Re: I Need Help With A PHP Script
« #36 on: March 12, 2006, 01:46 PM »

pojutime,

This is a trivial task - if you read my post on this, I said I will do it for you only if you agree to put a link back to my website. FYI - you can put all your quotes on different lines in a txt file and use the fget() function in php to call them randomly.
pojutime (m)
Re: I Need Help With A PHP Script
« #37 on: March 13, 2006, 01:43 PM »

its not random, its supposed to be sequential. once a file is displayed (for 24 hours), it should move to the next and display it.
Seun (m)
Re: I Need Help With A PHP Script
« #38 on: March 13, 2006, 10:14 PM »

Offer some money and you will get a solution in 24 hours.  Grin
nwaigbo-annoying
Re: I Need Help With A PHP Script
« #39 on: March 14, 2006, 05:04 AM »

pojutime, I'm not sure if you got the solution to your problem yet but I might be able to help you,  I read your questions but maybe you should explain what you are trying to do a little more,

This is what I got from your questions
--you want to have text  files in a folder
--then you want when someone click on a link that file should display in a different window
--if the person visit your site within 24 hours that person should see a different file in a pop-up window?

if this is what you are trying to do then you I have a question for you
--Do visitors need to login to view the content of these files?
if you still need answer to your questions please answer the questions above I might be able to help you out,  Thanks
alexis (m)
Re: I Need Help With A PHP Script
« #40 on: March 14, 2006, 08:43 AM »

Pojutime, you are going back and forth with this - random or sequential is no wahala, it's either

1. You pay for it - then everything becomes yours
2. You link back to my site and said the script was developed by me
3. I host the script and you link to it

Which do you prefer?
pojutime (m)
Re: I Need Help With A PHP Script
« #41 on: March 14, 2006, 12:31 PM »

Quote from: nwaigbo31 on March 14, 2006, 05:04 AM
pojutime, I'm not sure if you got the solution to your problem yet but I might be able to help you, I read your questions but maybe you should explain what you are trying to do a little more,

This is what I got from your questions
--you want to have text files in a folder
--then you want when someone click on a link that file should display in a different window
--if the person visit your site within 24 hours that person should see a different file in a pop-up window?

if this is what you are trying to do then you I have a question for you
--Do visitors need to login to view the content of these files?
if you still need answer to your questions please answer the questions above I might be able to help you out, Thanks


Thanks, no login required. Any visitor can access the pages.
qleyo (f)
Re: I Need Help With A PHP Script
« #42 on: March 21, 2006, 11:46 AM »

Who ever ends up doing this, if you MUST use a file then please use .xml

If you decide to go the database route in the end you can easy import xml files into most databases.

This seems rather straight forward :
Form takes in the quote. Perhaps with author field.

Writes it to the file in format
<quote>
    <author>name</author>
    <text>quote text</author>
</quote>

And you parse that back, into an array, perhaps 2d array.
And use simple rand() to select an array index (also include mod sizeof array so you do not go out of bounds).

thekrafter (m)
Re: I Need Help With A PHP Script
« #43 on: March 22, 2006, 12:32 AM »

Na wa o! This kain problem sef!

If there's no login required I assume EVERYONE who visits the site sees the same text file (quotation) on a given day?
alexis (m)
Re: I Need Help With A PHP Script
« #44 on: March 26, 2006, 03:17 PM »

I don't think pojutime is serious about this script. Let someone do it for you for free and you give the person the credit, pay for it and have the code for yourself - simple matter
Seun (m)
Re: I Need Help With A PHP Script
« #45 on: March 26, 2006, 03:19 PM »

Quote
I don't think pojutime is serious about this script. Let someone do it for you for free and you give the person the credit, pay for it and have the code for yourself - simple matter

alexis: how can he pay for what is done for free? Huh
alexis (m)
Re: I Need Help With A PHP Script
« #46 on: March 26, 2006, 03:22 PM »

Seun - I gave him 2 options.

1. I do it for free but you give me your word that you will credit the work to me by displaying my website link on the site you will host the page
2. I build it for you for a small fee and you use it as you like, you don't have to give me any credit or link to my site
oasis
Re: I Need Help With A PHP Script
« #47 on: March 26, 2006, 08:16 PM »

@alexis

I quite agree with you about crediting you with a link.    It's the least he could do.  And since he has clearly shown that he's not willing to pay to get the job done, and not willing to learn php to do it himself, a link back to your website is a fair deal.

He's been dragging his feet ever since he was given this option.  I wonder what exactly he's looking for?
pojutime (m)
Re: I Need Help With A PHP Script
« #48 on: March 27, 2006, 03:33 PM »

the solution
oasis
Re: I Need Help With A PHP Script
« #49 on: March 27, 2006, 05:10 PM »

Seun, what are you afraid of?

How come you always go round deleting every post that says something about you that you don't like?  That is so dishonest.

Be a man and accept challenges like everyone else.

oasis
Re: I Need Help With A PHP Script
« #50 on: March 27, 2006, 05:16 PM »

Quote
the solution

Well, just say when.
pojutime (m)
Re: I Need Help With A PHP Script
« #51 on: March 28, 2006, 02:57 PM »

why not now?
sbucareer (m)
Re: I Need Help With A PHP Script
« #52 on: March 28, 2006, 05:19 PM »


Please if you have the solution just give it to this man. At least in the binary code, put your name in the author section and put code proprietary license, contact needed for any code re-modification and re-distribution. And register it under the GNU license.

oasis
Re: I Need Help With A PHP Script
« #53 on: March 28, 2006, 05:27 PM »

Quote
why not now?

Yes, why not now?

Quote
Seun - I gave him 2 options.

1. I do it for free but you give me your word that you will credit the work to me by displaying my website link on the site you will host the page
2. I build it for you for a small fee and you use it as you like, you don't have to give me any credit or link to my site
 
 
pojutime (m)
Re: I Need Help With A PHP Script
« #54 on: March 29, 2006, 02:26 PM »

so what are we waiting for?
oasis
Re: I Need Help With A PHP Script
« #55 on: March 29, 2006, 05:37 PM »

Quote
so what are we waiting for?

alexis is waiting for your response, which you haven't given any.
alexis (m)
Re: I Need Help With A PHP Script
« #56 on: March 29, 2006, 09:46 PM »

oasis,

I doubt if pojutime is serious about this script, to tell you the truth, I have lost interest in this particular thread. Rather - I am concentrating my effort on starting a php tutorial, please assist if you have any php experience.

To anyone that has some php skills, let us start a php tutorial, I will put one up tonight.
pojutime (m)
Re: I Need Help With A PHP Script
« #57 on: March 30, 2006, 04:25 PM »

 Cry
nwaigbo-annoying
Re: I Need Help With A PHP Script
« #58 on: April 01, 2006, 04:19 PM »

I think I have a script that can do this,  I've been really busy,  Also I wish this guy can tell us more about what he really want to do with this script,

To do what you are saying here's one way to do it

-- you need a way to keep track of the visitors -- since no login is required, cookie will be the best option but if the user delete their cookie  you may not be able to show them a different file if they come back within 24 hours

-- use a fixed naming conversion for the files E.G file1.txt, file2.txt , 

--php has a function you can use to get certain type of file that match the pettern  you want E.G you can get all text files  in a directory , The name of this function is called   "glob"   ,  check php manual

-- now you will start by first checking if the user visited your site in the last 24 hours
  This can be done by installing a cookie that has date and time information in it , then you try to read this cookie when someone visit your site,  if the cookie is not there , this maybe their first time so you install the cookie. then display the default file ,  or it may be that they deleted their cookie or their last visit expired.

-- also you can save the name of the file the person viewed the last time they visited your site,  you can do this by adding the file number only ,  that means instead of adding file1.txt  you will enter 1

--- your cookie value might look like this    date-time-file_number,file_number

-- when you read this cookie back you can use a function in php called "explode" This function allows you to break up a string at a set point in this case the point will be  ( -  ) hyphen ,  This will allow you  to read the date, time and file numbers separately.

,  Not sure if this helped you?

If you are a php programmer this might give you a clue but if you are not a php programmer then you may need to wait for the script,  My issue with your request is not money I can give you the script free ,   I wish you could give more information about what you really want .
 Towards A Stronger Nigerian Software Industry  Any Programming Or Software Engineering Jobs?  Who Wants to Start an Electronic Game Development Company?  Page 2
Pages: (1) (2) Go Up Send Topic to Friend by E-mail Reply 
Google
 
Web www.nairaland.com
Sections: TV/Movies (2) Music/Radio (2) Celebrities Jobs (2) Career Romance Books Politics Sports Fashion Travel
Health Schooling Religion General(2) Business Webmaster Programming Computers Phones Cars & Trucks

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.