50 Posted Topics
In my Apache log yesterday, I noticed these strange errors: [CODE] 127.0.0.1 - - [17/Apr/2011:15:02:36 +0100] "GET /icons/blank.gif HTTP/1.1" 200 487 "http://localhost/" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)" 127.0.0.1 - - [17/Apr/2011:15:02:36 +0100] "GET /icons/layout.gif HTTP/1.1" 200 616 "http://localhost/" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)" 127.0.0.1 - - [17/Apr/2011:15:02:36 +0100] "GET /icons/text.gif HTTP/1.1" 200 569 "http://localhost/" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)" … | |
I am trying to serve up some PHP files as extension-less or as custom extensions (e.g. test.myfile1). This is my current .htaccess: [CODE]#AddHandler application/x-httpd-php .$ RewriteRule ^([^\.]+)$ $1 [T=application/x-httpd-php-source] [/CODE] Previously it was: [CODE] AddHandler application/x-httpd-php .$ [/CODE] Which is better, and how should I go about this? Thanks | |
I have two databases, tvguide and episodes1. Both are InnoDB, and I use Phpmyadmin to edit them. I tried creating a foreign key between the "episode" field of episodes1 and tvguide, and this error message came up: Error creating foreign key (check data types) : episode How can I fix … | |
How do I get IIS 7.0 to run virtual hosts as in Apache? I've tried the hosts file but it doesn't work, and using Apache's reverse proxy didn't help either - as suggested elsewhere on the net. Anyone able to figure this one out? Thanks! | |
This is my pagination script: [CODE] <?php /*********************************** * PhpMyCoder Paginator * * Created By PhpMyCoder * * 2010 PhpMyCoder * * ------------------------------- * * You may use this code as long * * as this notice stays intact and * * the proper credit is given to * * … | |
This is my code, as seen here: [url]http://pcafansa6.hosticks.com/episode1.php[/url] [CODE]<?php /*********************************** * PhpMyCoder Paginator * * Created By PhpMyCoder * * 2010 PhpMyCoder * * ------------------------------- * * You may use this code as long * * as this notice stays intact and * * the proper credit is given to … | |
I've got my pagination script working, but now I need help trying to get it to extract data from 2 different sources. The episode data is stored in table episodes, whilst the main table (where the info on airdates for episodes is stored in epdata2). This is my code: [CODE] … | |
This is my XML code: [CODE]<?xml version="1.0" encoding="ISO-8859-1"?> <library> <episodes> <episode> <eptitle>Police Stop!</eptitle> <epno></epno> <desc>Dangerous driving caught on camera.</desc> </episode> <episode> <eptitle>Police Stop! 2</eptitle> <epno></epno> <desc>Dangerous driving caught on camera. Including a pursuit through the Midlands.</desc> </episode> <episode> <eptitle>Police Stop! 3</eptitle> <epno></epno> <desc>Featuring footage of dangerous driving on our roads, … | |
I've been trying to create a specialised CMS, as none of the current open-source ones fit my needs for this project. I'm trying to create a CMS for a TV/episode guide which is similar to this: [url]http://library.digiguide.com/lib/programmenextshowing/Police%2C+Camera%2C+Action!-12578[/url] (one such example) - where records expire and delete from the database after … | |
This is my PHP code (currently commented out in my templates) which is used in the project mentioned here - [url]http://www.daniweb.com/forums/thread251774.html[/url] (a currently ongoing project): [CODE] <div class="indented searchFooter" style="border-top: 1px solid rgb(207, 214, 233);"><table summary="" class="stNoMargins" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="tinyText stNoMargins"><div class="btnContainer"><ul><li><a class="smBtnSel" href="tvguide.php?page=1">1</a></li><li><a class="smBtn" href="tvguide.php?page=2">2</a></li><li><a class="smBtn" href="tvguide.php?page=2" title="Next … | |
This is my code, which displays either an image, or message depending on the time: [CODE]<?php $b = time(); $hour = date("g",$b); $m = date ("A", $b); if ($m == "AM") { if ($hour == 12) { echo "Good Evening!"; } elseif ($hour < 4) { echo "Good Evening!"; } … | |
I'm new to wget, I've looked it up on Google, done my research, but am still struggling to use it to be able to make a local copy of the site (sometimes images show up from the web in the HTML of the site, and not the local copy of … | |
This is my pagination script which is partially working: [CODE] <HEAD> <LINK href="style1.css" rel="stylesheet" type="text/css"> </HEAD> <?php /* Place code to connect to your DB here. */ include('config.php'); // include your code to connect to DB. $tbl_name="episodes"; //your table name // How many adjacent pages should be shown on each … | |
I've (partially) managed to get modaspdotnet to run on apache. This is my code: [CODE] LoadModule aspdotnet_module "modules/mod_aspdotnet.so" AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj \ licx rem resources resx soap vb vbproj vsdisco webinfo # For all virtual ASP.NET webs, we need the aspnet_client files … | |
I have recently been looking at the Pager script in PEAR, and installed it to my Apache install. This is my existing code for my script (which doesn't use PEAR'S Pager script, for now anyway): [CODE] <?PHP //connect to mysql //change user and password to your mySQL name and password … | |
I created code for my TV guide web site, as mentioned in a previous thread ([url]http://www.daniweb.com/forums/thread247517.html[/url]). I solved the problem, in the code below. This is the new code, which works well: [CODE] <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORD"); //select which … | |
This is a code for my radio station schedule, which works well, no error messages: [CODE] <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORD"); //select which database you want to edit mysql_select_db("radio1"); //select the table $result = mysql_query("select * from schedule order by … | |
I've managed to get PHP to work well with SQL, but date and time-related parts of my site are proving difficult to understand. I've created 3 records with these dates: December 26th (2009) - 2:25pm January 5th, 2010 - 3:00pm January 7th, 2010 - 9:00pm I'm trying to get it … | |
I'm getting a bit better at PHP, but the datetime with databases is proving hard to do for this particular bit of coding, no matter how much I practise! Here's my code (ignoring the database parts in the header): [CODE]//select the table $result = mysql_query("select * from epdata1 order by … | |
I've got a simple PHP page with a list of events that are taking place at certain times on certain days, and this is my code: [CODE] <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORD"); //select which database you want to edit mysql_select_db("events"); … | |
This is my code: [CODE] <?php //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORDREMOVED"); //select which database you want to edit mysql_select_db("tvguide"); //select the table $result = mysql_query("select * from epair LIMIT 20;"); //grab all the content while($r=mysql_fetch_array($result)) { //the format is $variable = … | |
This is the code for my TV guide website (stored on localhost)'s articles in PHP: [CODE] <?php //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORDREMOVED"); //select which database you want to edit mysql_select_db("tvguide"); //select the table $result = mysql_query("select * from epdata"); //grab all … | |
This is an included file on one of my PHP sites on localhost: [CODE] <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORDDELETED"); //select which database you want to edit mysql_select_db("myradiostation1"); //select the table $result = mysql_query("select * from presenters"); //grab all the content … ![]() | |
I get these errors in a script of mine: [CODE]Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\www\vhosts\myradiostation\test.php on line 13[/CODE] and my original page (included in another page): [CODE] <?php //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORDREMOVED"); //select … | |
I've been trying to create a database-driven site, am new to this, have looked it up on Google and tried for myself, but need a bit of help. [CODE] <?php // Connects to your Database mysql_connect("localhost", "root", "PASSWORDREMOVED") or die(mysql_error()); mysql_select_db("epguides") or die(mysql_error()); $data = mysql_query("SELECT * FROM epguides) or … | |
How do you get this to work? - well, for more than simple <strong> and <i> tags - I'm trying to get a HTML table in as an array, if this is possible! Any advice is appreciated! | |
How do I use wget to download a full website to a certain folder. I'm trying to download [url]www.mercia.co.uk[/url] but can't extract it to C:/mymerciasite I'm on Windows Vista Home Edition, if that's relevant. | |
I've just been learning arrays, and so far it's going well :) This is my current PHP code: [CODE]<?php $states = array ('MD' => 'Maryland', 'IL' => 'Illinois', 'MI' => 'Michigan'); $provinces = array ('QC' => 'Quebec', 'AB' => 'Alberta'); $abbr = array ('US' => $states, 'Canada' => $provinces); $japanesemotors … | |
I'm trying to set dynamic titles on my pages with a switch statement, but can't get it to work. Tried ifelse using code gleaned from Google but it didn't work. I'm trying to get it so that all my pages' titles are able to be dynamically used from a value … | |
This is the echo code from my site: [CODE] <?php $url1 = "http://www.canadiandriver.com"; $url2 = "http://www.chevrolet.com.br"; $autoguide = "Autoweekly"; $autoguide1 = /"<b>"<a href=\"$url1\buyers-guide/2010/volkswagen/passat.php"\>New car of the day</a>"/</b>"; ?> [/CODE] Yet it produces a T_STRING error, and I can't work out how to fix it. The other variables work fine, $autoguide1 … | |
This is my code which is intended to produce an URL like the following: [url]www.mysite.com/test.php?day=1[/url] [CODE] <? if (!$_GET['day']) { $day = date('N'); } elseif ($_GET['day']==1){ ?> <?php include("test1.php") ?> <? }else if($_GET['day']==2){ ?> <?php include("test2.php") ?> <? }else if($_GET['day']==3){ ?> <?php include("test3.php") ?> <? }else if($_GET['day']==4){ ?> <?php include("test4.php") … ![]() | |
This is my script, which is intended to show a different page depending on day of the week. [CODE]<html> <? error_reporting(E_ALL);?> <body> <? $i=$_GET['day']; switch ($i) { case 0: include("2.php"); break; case 1: include("3.php"); break; case 2: include("4.php"); break; case 7: include("5.php"); break; default: echo "page not found!!!!"; } ?> … | |
This is my code - which displays different articles and produces articles as [url]http://www.mysite.com/testpage.php?test=1[/url] [CODE]<html> <body> <? $i=$_GET['day']; switch ($i) { case 1: include("2.php"); break; case 2: include("3.php"); break; case 3: include("4.php"); break; default: //echo "page not found!!!!"; } ?> <!-- <? if($_GET['day']==1){ ?> <?php include("2.php") ?> <? }else if($_GET['day']==2){ … | |
I am making my website about a radio station, and it's currently PHP-based, but I am testing an ASP-based one on my dev machine. This is the PHP querystring code: [ICODE]<? $i=$_GET['DJID']; switch ($i) { case 1: include("dj1.php"); break; case 2: include("dj2.php"); break; case 3: include("dj3.php"); break; default: echo "page … | |
I've been trying out arrays recently, and this is my coding: [ICODE]<?php $data = array('autoguide1'=>'car', 'baz'=>'boom', 'scotland'=>'haggis', 'php'=>'hypertext processor'); echo http_build_query($data); // autoguide1=car&baz=boom&scotland=haggis&php=hypertext+processor echo http_build_query($data, '', '&'); // foo=bar&baz=boom&cow=milk&php=hypertext+processor ?> [/ICODE] What I want to try and do is make my PHP code run so that I can include a … | |
I got arrays working first time! :) This is the website's source code, the file is testing.php. Source code: [ICODE]<?php $data = array('test'=>'testingpage', 'test1'=>'test1a', 'cars'=>'mycarpage', 'php'=>'hypertext processor'); // echo http_build_query($data); // foo=bar&baz=boom&cow=milk&php=hypertext+processor // test // echo http_build_query($data, '', '&'); // foo=bar&baz=boom&cow=milk&php=hypertext+processor // include("http://mywebsite.localhost.com/test.php/"); ?> [/ICODE] and when typed in the … | |
I'm trying to get multiple variables to work in the query string with PHP. This is my code: [CODE]<? $programme=$_GET['programme']; switch ($programme) { case 12578: include("http://mysite1.com/programme/TopGear"); break; case ER: include("http://mysite1.com/programme/ER); break; default: echo "page not found!!!!"; } $hPage=$_GET['hPage']; switch ($hPage) { case 1: include("page1.php"); break; case 2: include("page2.php"); break; case … | |
Thank you for the tutorial last time on query strings :) It worked for me, this is my working query string: [code=php]<? $i=$_GET['vehicle']; switch ($i) { case Chrysler: include("chryslernew.php"); break; case Chevrolet: include("chevnew.php"); break; default: echo "include ("nopage.php")"; } ?>[/code] However, I'm trying to get my PHP URLs with query … | |
I got my httpd.conf and virtual hosts working properly, no problems there! :) Using mod_rewrite is the big problem. I've created the page [url]http://mycarwebsite1.com/page2.php[/url] but want to rewrite it without the extension on the end. Also, what does this do (from my example): [QUOTE] RewriteEngine on RewriteRule ^12.php$ 13.php [/QUOTE] … | |
I'm trying to create a magazine for the organization I work for, and am looking for good desktop publishing software. I've got a copy of [I]Motor Trend[/I] in front of me as I write this, and I'm wondering if anyone knows what software's used to create this? Obviously my magazine … | |
I'm looking for an offline browser to make a backup copy of my site with. I tried WinHTTrack but it created an index.html file with a directory listing, and didn't always render some pages properly. I had a look on Google for "offline browser" but a lot of them are … | |
I've been testing a few PHP scripts on an Apache server with Apache 2.2, the latest version, and a PHPMyadmin. Currently I'm running MediaWiki and a PHPbb board, with testing content. I want to prevent access from the outside world, how would I do this?? Currently typing my IP address … | |
I tried looking on Google for info on this, but not much came to light. I'm trying to do a query string that takes info from text files and renders them as PAGENAME.php?id=1 - without using a database, if possible. My file is called test.php and this is its content: … | |
I have a PHP page with query strings in, and that works, but getting it to display the correct page depending on the day via a switch statement is a problem. This is the code: [ICODE]<html> <body> <? if($_GET['day']==1){ ?> <?php include("day1.php") ?> <? }else if($_GET['day']==2){ ?> <?php include("day2.php") ?> … | |
I'm slowly getting there with PHP templates! :) Here's my basic PHP page: [code]<TITLE>Star FM</TITLE> <head> <style type="text/css"> CAPTION.MYTABLE { background-color:#8080ff; color:white; border-style:solid; border-width:0px; border-color:black; } TABLE.MYTABLE { font-family:arial; font-size:10pt; background-color:#2554C7; width:780px; border-style:solid; border-color:black; border-width:0px; } TH.MYTABLE { font-size:10pt; color:white; } TR.MYTABLE { } TD.MYTABLE { font-size:10pt; background-color:#2554C7; color:white; border-style:solid; … | |
I've been trying to create a template-based site on my XAMPP server, but it hasn't come to much! I saved [url]http://www.wyvernfm.co.uk/schedule.asp[/url] as testpage.htm using Opera (best browser for saving webpages in!) but am not sure how to set variables in a PHP template for the presenters and images so that … | |
OK, so what I'm trying to do here is create a PHP site that's driven by a database similar to this one: [url]http://library.digiguide.com/lib/programmenextshowing/Police%2C+Camera%2C+Action!-12578[/url] [url]http://library.digiguide.com/lib/programmenextshowing/House-238308[/url] That site basically uses a PHP database and the pages are generated from the database as far as I'm aware. I'm trying to do a similar … | |
I've just been editing an open-source PHP application (original version at [url]http://scripts.ringsworld.com/content-management/basiccms/[/url] , and modifying it to suit my needs :icon_cheesygrin: However, the PHP application is a CMS and always generates URLs this way: [url]http://yourwebaddresshere.com/cms/?id=1[/url] when I am trying to get it to be [url]http://yourwebaddresshere.com/cms/?id=pagename[/url] but I am struggling to … | |
Re: [B]*removed by me - resolved privately*[/B] | |
Anyone got advice on what the best free ones are?? I've tried HTTrack, and it's OK, but are there any other recommended alternatives?? |
The End.