Jump to content

nick.a

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Bulgaria

nick.a's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey, I know this is a late update but yes, I asked Awardspace to enable fsockopen and they did. Same thing though - could the problem be in my firewall? I've switched off the Microsoft one along with Comodo and still, it shows all of those services as not working. Help?
  2. Hi all, I have this script I used on a site hosted on my machine that checked if different servers and applications were running on my machine. Here's the code. <html> <body> <style> fd{ color: #000000 font-size:100% } </style> <?php function check_port($port) { $conn = @fsockopen("212.233.xxx.xxx", $port, $errno, $errstr, 0.2); if ($conn) { fclose($conn); return true; } } function server_report() { $report = array(); $svcs = array('21'=>'FTP', '22'=>'SSH', '25'=>'SMTP', '80'=>'HTTP', '110'=>'POP3', '143'=>'IMAP', '3306'=>'MySQL', '8080'=>'HFS', '8081'=>'Webcam', '3784'=>'Ventrilo'); foreach ($svcs as $port=>$service) { $report[$service] = check_port($port); } return $report; } $report = server_report(); ?> <center> <table> <tr> <td><font face="Verdana" size="1" color="#000000">Apache:</td> <td><font face="Verdana" size="1" color="#000000"> <?php echo $report['HTTP'] ? "<img src='main/images/on.png' width='16' height='15' border='0'>" : "<img src='main/images/off.png' width='16' height='15' border='0'>"; ?></font></td> </tr> <tr> <td><font face="Verdana" size="1" color="#000000">MySQL:</td> <td><font face="Verdana" size="1" color="#000000"> <?php echo $report['MySQL'] ? "<img src='main/images/on.png' width='16' height='15' border='0'>" : "<img src='main/images/off.png' width='16' height='15' border='0'>"; ?></font></td> </tr> <tr> <td><font face="Verdana" size="1" color="#000000">HFS:</td> <td><font face="Verdana" size="1" color="#000000"> <?php echo $report['HFS'] ? "<img src='main/images/on.png' width='16' height='15' border='0'>" : "<img src='main/images/off.png' width='16' height='15' border='0'>"; ?></font></td> </tr> <tr> <td><font face="Verdana" size="1" color="#000000">FTP:</font></td> <td><font face="Verdana" size="1" color="#000000"> <?php echo $report['FTP'] ? "<img src='main/images/on.png' width='16' height='15' border='0'>" : "<img src='main/images/off.png' width='16' height='15' border='0'>"; ?></font></td> </tr> <tr> <td><font face="Verdana" size="1" color="#000000">Webcam:</font></td> <td><font face="Verdana" size="1" color="#000000"> <?php echo $report['Webcam'] ? "<img src='main/images/on.png' width='16' height='15' border='0'>" : "<img src='main/images/off.png' width='16' height='15' border='0'>"; ?></font></td> </tr> <tr> <td><font face="Verdana" size="1" color="#000000">Ventrilo:</font></td> <td><font face="Verdana" size="1" color="#000000"> <?php echo $report['Ventrilo'] ? "<img src='main/images/on.png' width='16' height='15' border='0'>" : "<img src='main/images/off.png' width='16' height='15' border='0'>"; ?></font></td> </tr> </table> </center> </body> </html> I've added the HTML too. As you can see it checks if the ports are open. It worked perfectly and I didn't have any issues with it at all. Now, for a couple of days, I've been using an awardspace paid hosting, bought a domain name. I use wordpress now, and I pasted this code directly in a PHP/HTML code box (I use a plugin that enables use of PHP) and it shows the HTML formatting how it should be, but unfortunately doesn't work as intended. It shows everything to be down, while apache, mysql and my ftp server are still running on my computer (the IP it checks, 212.233.xxx.xxx). When I set the IP to be 127.0.0.1, the IP of the awardspace server as far as my script is concerned, it shows only that the IP is working. So, any suggestions? Any idea would be greatly appreciated
  3. Hello to everyone! I got this problem - I use this to enter text in, then a script gets the text from it and writes it to a MySQL database - simple right? The issue is even more simple! How can I make the input box bigger? I've found some info on <textarea> but it's not working for me - the input type box "author" is working fine, but it's not entering anything from where I'm using <textarea> Any help on this? <form action="newsproc.php" method="post"> <p style="font-family:arial;color:black;font-size:10px;">author:</p> <input type="text" name="author" > <p style="font-family:arial;color:black;font-size:10px;">Text:</p> <textarea cols="50" rows="4" name="text"></textarea>
  4. Hello, I've decided to make myself a very simple php script to write data into a DB and read it from there... So, my question is. How would I be able to make so that the page where the script is included to show only the newest 3 articles and puts the others on pages (1,2,3... etc) ? Ideas would be appreciated. A bit of scripting help would be really, really appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.