| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Account Closed | got a question : php + mysql = love the title is just to make u read this topic ![]() What is the best Free news script which is available online ? i am planning to run a news site and am not sure what script to choose anyways i want to know how can i take data from a mysql database which is not on my server like i got a database on an other server i want to take data from it from my first server how is the code in php for that written thx Last edited by counter; 11-11-2007 at 12:51 AM. Reason: s |
| |
| | #2 (permalink) |
| Danltn.com | Code: mysql_connect('server', 'mysql_user', 'mysql_password');
Can be expanded to...
$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
__________________ Last edited by Danltn; 11-10-2007 at 11:07 AM. |
| |
| | #4 (permalink) |
| Senior Member | What danltn has provided is 100% correct but bear in mind that the database server must be set up to allow connections from external sources (most people set up their servers to only allow connections from trusted people. Also if the mySQl server is on a different network then you will encounter lag time. If you are using it to output data to a user then the load time of the page will be affected adversely.
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #5 (permalink) |
| DNOA Member | Don't get intimidated by all the configuration. it's not too difficult. In CPanel, set an access host on the database server to be the IP address of the client system that is accessing it. Then, if it still doesn't work, contact your database server's host to disable any firewalls for that domain on port 3307. Even if you didn't order firewall services, their networking team may have instilled a block on it. I had to do this to get my C# application on my PC to access a database on my server in Canada. The support team figured out what was causing the block and fixed it. It's really simple, really then: 1. Set access host to allow the IP of the accessor. 2. Contact host of db server if there are still problems. |
| |
| | #6 (permalink) |
| Account Closed | ok guys that was helpful ( i just wanted to know the way to write it) ill try it and let u know the result anyways i got more important question i am working on a news script that is about to collaps as its going to take me sometime to make a proper one when i can find loads of good scripts online What is the best Free news script which is available online ? i am planning to run a news site and am not sure what script to choose |
| |
| | #7 (permalink) |
| Senior Member | An alternative to reading it from MySql is CuteNEWS. It is a fantastic news system, that uses flat files (information stored in files): http://cutephp.com/cutenews/ It is very easy to use! They do, however, have a copyright that is placed at the bottom of your page. Joe
__________________ Fused Hosting Simplicity and Superiority. █████████████████████████████████████████████ Affordable web hosting solutions; shared, reseller, shoutcast, WHMSonic, proxy, dedicated and more! My computer is broken; new components have been ordered. ![]() |
| |
| | #11 (permalink) |
| Senior Member | wordpress is a blogging software http://wordpress.org/
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #12 (permalink) | |
| Danltn.com | Quote:
http://www.google.co.uk/search?q=WordPress http://search.yahoo.com/search?p=WordPress http://www.ask.com/web?q=WordPress http://search.live.com/results.aspx?q=WordPress All of which it ranks #1 for... Along with http://wordpress.org (and other exts.) Did you even try searching for it? Here's the link: http://wordpress.org | |
| |
| | #13 (permalink) |
| Account Closed | actualy i searched for Words Press check what i got http://www.google.co.uk/search?hl=en...G=Search&meta= |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |