Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,046 members, 7,818,146 topics. Date: Sunday, 05 May 2024 at 08:54 AM

I Need Help With A PHP Script - Programming (2) - Nairaland

Nairaland Forum / Science/Technology / Programming / I Need Help With A PHP Script (3762 Views)

HELP - Installing A PHP Script On My Website Using GITHUB / What Is The Average Salary Of A Php Programmer In Lagos / Can Obfuscated Php Script Be Decoded? (2) (3) (4)

(1) (2) (Reply) (Go Down)

Re: I Need Help With A PHP Script by qleyo(f): 11:58am On Mar 01, 2006
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,
Re: I Need Help With A PHP Script by alexis(m): 9:33pm On Mar 01, 2006
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.
Re: I Need Help With A PHP Script by sbucareer(f): 12:53am On Mar 02, 2006

That is fair enough
Re: I Need Help With A PHP Script by pojutime(m): 12:54pm On Mar 12, 2006
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
Re: I Need Help With A PHP Script by alexis(m): 1:46pm On Mar 12, 2006
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.
Re: I Need Help With A PHP Script by pojutime(m): 1:43pm On Mar 13, 2006
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.
Re: I Need Help With A PHP Script by Seun(m): 10:14pm On Mar 13, 2006
Offer some money and you will get a solution in 24 hours. grin
Re: I Need Help With A PHP Script by nwaigboannoying: 5:04am On Mar 14, 2006
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
Re: I Need Help With A PHP Script by alexis(m): 8:43am On Mar 14, 2006
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?
Re: I Need Help With A PHP Script by pojutime(m): 12:31pm On Mar 14, 2006
nwaigbo31:

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.
Re: I Need Help With A PHP Script by qleyo(f): 11:46am On Mar 21, 2006
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).
Re: I Need Help With A PHP Script by thekrafter(m): 12:32am On Mar 22, 2006
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?
Re: I Need Help With A PHP Script by alexis(m): 3:17pm On Mar 26, 2006
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
Re: I Need Help With A PHP Script by Seun(m): 3:19pm On Mar 26, 2006
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?
Re: I Need Help With A PHP Script by alexis(m): 3:22pm On Mar 26, 2006
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
Re: I Need Help With A PHP Script by oasis: 8:16pm On Mar 26, 2006
@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?
Re: I Need Help With A PHP Script by pojutime(m): 3:33pm On Mar 27, 2006
the solution
Re: I Need Help With A PHP Script by oasis: 5:10pm On Mar 27, 2006
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.
Re: I Need Help With A PHP Script by oasis: 5:16pm On Mar 27, 2006
the solution

Well, just say when.
Re: I Need Help With A PHP Script by pojutime(m): 2:57pm On Mar 28, 2006
why not now?
Re: I Need Help With A PHP Script by sbucareer(f): 5:19pm On Mar 28, 2006

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.

Re: I Need Help With A PHP Script by oasis: 5:27pm On Mar 28, 2006
why not now?

Yes, why not now?

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

Re: I Need Help With A PHP Script by pojutime(m): 2:26pm On Mar 29, 2006
so what are we waiting for?
Re: I Need Help With A PHP Script by oasis: 5:37pm On Mar 29, 2006
so what are we waiting for?

alexis is waiting for your response, which you haven't given any.
Re: I Need Help With A PHP Script by alexis(m): 9:46pm On Mar 29, 2006
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.
Re: I Need Help With A PHP Script by pojutime(m): 4:25pm On Mar 30, 2006
cry
Re: I Need Help With A PHP Script by nwaigboannoying: 4:19pm On Apr 01, 2006
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 .

(1) (2) (Reply)

Programming Challenge(python,java,vb,.net: Etc) / Facebook Database Schema (take A Look *parental Advisory*) / Can One Be A Web Developer And Software Engineer At The Same Time?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 46
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.