| | |
Letting other website access my database?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
hi all,
i'm almost done with the program im doing. one last thing i must do is to implement a search box dropdown on the other website with a dynamic content coming from our database. prob is, of course i dunno how to do that? xD
is
will do? i'll be experimenting later, but i need some idea so it wont take long..
im also concern with security...
any help?
im using cPanel bdw..
i'm almost done with the program im doing. one last thing i must do is to implement a search box dropdown on the other website with a dynamic content coming from our database. prob is, of course i dunno how to do that? xD
is
PHP Syntax (Toggle Plain Text)
require_once("http://www.mywebsite.com/include/db_connect.php")
im also concern with security...
any help?
im using cPanel bdw..
•
•
Join Date: Aug 2005
Posts: 150
Reputation:
Solved Threads: 13
first: you could try to access your databse directly (eg. mysql_connect("http://www.blah.com"); ). But that's in most cases restricted.
so you better do it this way:
write a simple php-routine and put it on the server where your database is running. Select all data you want to display on the other one and just echo them so that you get a plain text.
On the other server you can get these data with pfsockopen (http://de3.php.net/manual/en/function.pfsockopen.php).
For security you can have a simple password that you send via HTTP (a bit unsave though). If it's not enough then crypt it with MD5 or RSA (see wikipedia).
One more thing: pfsockopen is also restricted on some server. So try it out before you do all the fuss with coding.
so you better do it this way:
write a simple php-routine and put it on the server where your database is running. Select all data you want to display on the other one and just echo them so that you get a plain text.
On the other server you can get these data with pfsockopen (http://de3.php.net/manual/en/function.pfsockopen.php).
For security you can have a simple password that you send via HTTP (a bit unsave though). If it's not enough then crypt it with MD5 or RSA (see wikipedia).
One more thing: pfsockopen is also restricted on some server. So try it out before you do all the fuss with coding.
Last edited by sDJh; Apr 19th, 2008 at 5:25 pm.
![]() |
Other Threads in the PHP Forum
- Previous Thread: ooccurence of a string in a file
- Next Thread: favicon.ico was not found
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail menu mlm mod_rewrite msqli_multi_query multiple mycodeisbad mysql oop parameter parse paypal pdf php problem query radio random recursion regex remote script search seo server sessions sms soap source space sql static structure syntax system table tutorial update upload url validation validator variable video web webdesign wordpress xml youtube





