is this possible by PHP ?


#1

I want to have a database, that we can add these things in to it ,

Kurdish Word , Perisan translate , English translate , and example sentence , and …

then we want to have a script , so that we give this Script code to the webmasters, to add this script to their site , when they add this script to thier site , a random kurdish word with its translating will be showed in their site…

is that possible by PHP or I should search it somewhere else…

[Admin edit] I’ll pretend I didn’t see that message


#2

You’d have to manually create your own translation matrix which is possible in php, however you’d need your ‘clients’ to run a version of php which will run from your database.

If you cant do that maybe you could use some sort of javascript or java to do the job for you?


#3

Yes everything you want to do is possible with PHP. The database of translations will have to be created and maintained by you and the others can access the DB remotely. Caution however because for them to do that they will need access to the database. I suggest you set up a user that can only select rows (see GRANT) and then use that users information for the DB. You will also have to isolate/jail the DB as much as possible so hackers can’t access it or anything else. Please see the mysql manual for security information.

Creating the database is relatively easy. I always refer people to the codewalkers basic tutorial called “Creating Dynamic websites with PHP and MySQL”. There you will learn all the basics of creating and manipulating a database with PHP (just skip the install part). If you are more interested in creating a good database design for your project I can also give you a few links to learn more about that.

To select a random column from a database you may be able to just do it with the SQL. Maybe something like:
SELECT * FROM tbl_name ORDER BY RAND();
If you only want 1 column use the LIMIT keyword in the SQL.

References:
GRANT - http://dev.mysql.com/doc/mysql/en/GRANT.html
RAND() - http://dev.mysql.com/doc/mysql/en/Mathe … ml#IDX1362
LIMIT - http://dev.mysql.com/doc/mysql/en/SELECT.html


#4

I have hesitation to ask my question about the details, because the admin may delete my post ,

I really don’t know where I should ask more question , in this forum or … in other forum … dear admin can you help ?


#5

If you are to be angry with anyone please direct it to me. I was the one who brought it to the administrators attention (We don’t allow job or volunteer announcements).

We can and do want to help with any technical questions you may have. Big or small. So ask away.

If you are unsure how to ask a question go to the tutorials section and there is a link. And yes - how you ask a question is just as important as the question itself. We have all been where you are (just learning) and like you we all had to learn how to get someone to answer a simple question that is driving us crazy.


#6

…I try not to post , already asked questions , because , it is n’t polite .

Thanks anyway , and I am not angry with you .


#7

I’m not 100% sure why you think we are attacking you, I edited your post because of the suspect nature of the last line.

What you do or where you come from makes absolutely no difference to me and no doubt the same can be said for many other users of this forum. You should not feel the need broadcast your politics or country of origin. When it comes to an internet forum such as PHPHelp it doesn’t matter in the slightest what you do or where you come fro (however harsh that may sound).

You’re welcome to post where ever the topic is suited however you’ll have to use your own judgment as to which forum it slots into.

Maybe this has cleared a few things up have a fun time at PHPHelp,
Miles