Dynamicly Created Page, With Refereing Url Shown
I have loads of domain names but none have any hosting space associated. They are however all entered into my DNS, so when any of them are visited, the visitor ends up at the (unused) home page of my dns server.
I would like to put a php (or perl, or whatever else is suitable) page here so the visitor is shown a more freindly page.
So, for example, a "Welcome to domain.com, this page is under construction / for sale" type page is what I would want. So all I would need to do for each domain to have it's own page would be to enter the domains in to my DNS and the rest would be automatic.
View Complete Forum Thread with Replies
Related Forum Messages:
Displaying Dynamicly Created Images
I'm working on the registration page of my website, and am building in a system where the user has to read something out of a dynamically created image. I can create the image just fine, but how do I get it to display in a web page? Code:
View Replies !
Refresh Problem - Warning: Page Has Expired The Page You Requested Was Created Using Information
i got two php page at the movement, which they called edit2.php and edit3.php. when i submit a form from edit2.php to edit3.php, then i could not come back from edit3.php to edit2.php. Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. Code:
View Replies !
Update Form Created Web Page
Is ther a way to update a page based on a text area in a form. I have a form that has two text areas one is for asking question of admin and the other is for public to see (Testimonial). What I need is if the user fills out the form and uses the Testimonial text area then the page is updated. If the question text area is used it doesnt update the page. In other words if the Testimonial text area is left blank the page doenst update. See code below. PHP Code: mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $sql = 'SELECT Testimonial , First_Name , Last_Name , Company , City , State , Date FROM Comments ORDER BY Date DESC LIMIT 0, 30 ' $result=mysql_query($sql); $num=mysql_numrows($result); if ($num==0) { }else{ .......................
View Replies !
Php Created Popup Error Message Page
I have created a system using PHP & Javascript that works OK except that I want a neat display of error messages. Error messages caught at the client are displayed in a Javascript alert, which is fine. But errors caught at the server are not as well displayed and therefore I thought that I would ask if anyone has produced a "popup error message page" that would look similar to a Javascript alert but would originate at the server.
View Replies !
[fopen()] Unzip Uploaded File To Created Newly Created Directory
Right i have already spent the best part of 8 hours trying to get this working. What i am trying to do: Upload zip file to directory. Check if upload is successfull and then unzip to directory created by name of zip file. I can upload the zip file and create the diectory but the damn files wont unzip to the newly created directory ....
View Replies !
Checkboxes Dynamicly Generated
I have a form with 3 checkboxes wich have all the same name: <input type=checkbox name=test value=val1> <input type=checkbox name=test value=val2> <input type=checkbox name=test value=val3> now on the target page i need all values that are checked, so if they are all 3 ckecked i need to get val1, val2 and val3 on the target page. With ASP you get the varaible test = val1;val2;val3 (the values are all put in one variable, separated with a ";" But when i use PhP i only get the last value in this case "val3". What do i need to do to get all values? I have named them all the same because those checkboxes are dynamicly generated. I dont know how many there will be.
View Replies !
Populating A List Dynamicly
Is there an easy way to populate a list dynamicly? It stinks javascript here, but I don't know how to do it with that either. I have one list A that contains enteries with ID's as values. List B should then fill with information from a database according to wich ID is choosen in list A. Since alot of otherthings is entered on the page to I would like to nopt have to deal with sending all the data and loading the same page again. Is there a way in PHP to link to the same page and have all the filled textfields stay as they were? Or do I have to use post? I have the thought of loading all the data from the database and having it in an array or something and having a javascript picking and writing the choosen ones to the list. But that would be alot of excess data so getting it "live" from the db would be better.
View Replies !
Breaking Up The Query String Dynamicly?
using $Get_string = $_SERVER['QUERY_STRING']; to receive a query string such as month=may&$day=15&year=2006 so that $Get_string = "month=may&$day=15&year=2006" can I separate the values and turn them into variables? (like a normally would with a url get) $month = "may" $day= "15" etc it would be great to just do $_GET on the url but I'm sending the string as a variable to another script... so i can't just go the easy route.
View Replies !
Create A Query In Order To Dynamicly Popular A Listbox
I am trying to create a query in order to dynamicly popular a listbox however I am trying to fill the listbox with years such as 2007 etc based on if they are stored in the data base. The problem is that two tables have to be checked that have no relation to eachother but this caues the problem of duplication so if both tables have 2007 it will appear in the list more than once. Code:
View Replies !
Pages Not Shown At All
I've installed php 5.2 on iis. the pages doesn't seem to load at all. all I get is blank pages. my code is no more then : <html> <head> </head> <body> <p>111</p> </body> </html>
View Replies !
Following Warning Is Shown
when i run the script the following warning is shown, i dono how to rectify it, Code: Warning: Cannot modify header information - headers already sent by (output started at /var/www/tuition/index.php:135) in /var/www/tuition/login.php on line 43
View Replies !
No Login Prompt Shown
i am trying to make a folder in my localhost (xampp on WinXp) secure, so that the normal browsers cant access that. i am using ‘.htaccess’ protection method, and I want to get a login prompt when someone trying to access his folder, and the one who know the password can access. But what i am getting now is just a forbidden error message and no login prompt. i have done all accordingly, added info in httpd.conf, created .htpasswd, placed .htaccess in that folder and given the path info of .htpasswd.
View Replies !
MySQL Passwords Shown In Php Errors
I'm buiding a rather large database driven content site for a client (a bank that's why this is so important). As I've been tinkering and making some database calls I got wondering if php will ever get confused and output the script as the "text file and display your db info on someones screen? I remember php was installed wrong the first time and that's what it did.
View Replies !
Read All {{var}} Within A String To Be Shown To User
I'm stumped with this little task of obtaining {{var}} object/variables from within a message (or string), where a string may contain 5-10 different instances of a {{var2}} or {{var3}} etc. I am looking to take all instances it can find, to be displayed dynamically for what a user can use for variable/objects within an online email application. If the string contained: $string = "Welcome {{user}}, thanks for joining {{site_name}}." I would want the php code to read $string and for all the {{vars}} and then to be displayed dynamically like: {{user}} - {{site_name}} - etc So they know exactly what {{var}}'s are available to them while modifying content on that specific template.
View Replies !
Query - Results To Be Shown Left To Right
The query works but it presents the results top to bottom all on one page within a table. What I need is for the results to be shown left to right in three columns and the with several rows below. I then want the results to be show across several pages. I've tried doing one or two things but the code ends up being messed up. Code:
View Replies !
Errors Shown Locally (in The HTML)
I have a script with some evals. When an error occurs in the eval PHP+HTML code, the error is shown after that a lot of HTML has already been output (Provided that the error is not very serious - a warning for example - and that there is some HTML code before the PHP code from which the error comes). This is annoying. I would like the error msgs to be displayed like the parse errors msgs get displayed (that is alone and top, right of the page). Is this possible with errors being displayed locally in the HTML?
View Replies !
Directory Files Shown Problem
i have a function that it showes files in an directory. <? $dizin_adi = "./klasor"; $dizin = opendir ($dizin_adi); while ( gettype ( $bilgi = readdir( $dizin ) )!= @boolean ) { if ( is_file( "$dizin_adi/$bilgi" ) ) echo "<option value="$dizin_adi/$bilgi">".$bilgi."</option>"; } closedir ($dizin); // ?> this function is true. it's working. but i want to show an upper directory files. now it showes (www.domain.com/klasor/...) but i want to show (www.domain.com/...). Code:
View Replies !
Output Shown Only In Command Line And Not In Browser
I have the following code in a script -------------------------------------------------------------------------------------------------------------------------------- foreach($serverlist as $sno=>$serverdata) { $servername = $serverdata['name']; if($servername) { unset($outputstr, $outputarr); $outputstr = exec("ssh -n ".$servername." 'fstat | wc -l'", $outputarr); echo " ----------------------------------------------------------"; echo " ssh -n ".$servername." 'fstat | wc -l' "; echo " servername = ".$servername; echo " outputstr = "; var_dump($outputstr); echo " outputarr = "; var_dump($outputarr); } } -------------------------------------------------------------------------------------------------------------------------------- When executed from browser it displayed: ---------------------------------------------------------- ssh -n 192.168.0.155 'fstat | wc -l' servername = 192.168.0.155 outputstr = string(0) "" outputarr = array(0) { } ---------------------------------------------------------- ssh -n 192.168.0.156 'fstat | wc -l' servername = 192.168.0.156 outputstr = string(0) "" outputarr = array(0) { } ---------------------------------------------------------- ssh -n 192.168.0.159 'fstat | wc -l' servername = 192.168.0.159 outputstr = string(0) "" outputarr = array(0) { } -------------------------------------------------------------------------------------------------------------------------------- When executed from command line it displayed: PHP Warning: Module 'ctype' already loaded in Unknown on line 0 PHP Warning: Module 'SimpleXML' already loaded in Unknown on line 0 PHP Warning: Module 'dom' already loaded in Unknown on line 0 PHP Warning: Module 'iconv' already loaded in Unknown on line 0 PHP Warning: Module 'pspell' already loaded in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20041030-debug/ssh2.so' - /usr/local/lib/php/20041030-debug/ssh2.so: unsupported file layout in Unknown on line 0 PHP Warning: Module 'pcre' already loaded in Unknown on line 0 PHP Warning: Module 'xml' already loaded in Unknown on line 0 bash: fstat: command not found Password:
View Replies !
Links Pointing On PHP Manual Not Shown In Error Messages
I have html_errors set On and it's visible that it's on because I get some parts of the error messages bold. The problem is I can't get any links to point to the PHP manual. docref_root = "/php_manual/" docref_ext = ".html" are set but no links are appearing. By that I mean there are absolutely no <a> tags or anything of that sort in my error outputs. I tried generating almost every type of error but please if somebody could post a line or two of code that produces some clickable error message on their box so that I can test it on my. (send the output also, please) if my script is: <?php $var1 = 'var1' $var2 = 'var2' ?> I get this output <br /> <b>Parse error</b>: syntax error, unexpected T_VARIABLE in <b>e:www estarray.php</b> on line <b>3</b><br /> shouldn't there be any links in that pointing to PHP manual in my php_manual dir? :-(
View Replies !
Rice For That Particular Activity To Be Shown In A Non-editable Input Box So That It Can Be Passed Onto The Email Send Script.
my form is a booking form where a user can book an activity. i have it linked to a mysql database so that there is a combo box with the titles of the activites, also in the table is the price of the activity. what i want to happen is when the user selects one of the activities i want the price for that particular activity to be shown in a non-editable input box so that it can be passed onto the email send script. any ideas on how i can do this? also i want something for a date selector. since there are not the same amount of days in each month i want my form to be able to determine what month the user selected and then the right amount of days show in the day combo box. for example if the user selects february in the month box, the day list should only go up to 28. then maybe when the user selects 2008 (the next year to be a leap year) the days in feb goes up to 29.
View Replies !
Value Of Variable Shown As "Array" When From Included File
I have this statement to find the latest date that a row was inserted ________ $entry=mysql_query("SELECT contact FROM board ORDER BY contact DESC LIMIT 1")or die ("Query failed:<br>$entry<br>Error: " . mysql_error()); while($myrow=mysql_fetch_array($entry)){ if (ISSET($myrow['contact'])){ $latest = date("d M y", ($myrow['contact']+50400)); } } ________ This reports the value for $latest correctly if the statement is in the document. However when the statement is in an included file the reported value for $latest is ... Array Where am I going wrong?
View Replies !
Images Shown In Outlook Express But Not In Outlook 2003
I'm writing a php code to send email in mime format. All seams ok if I read the email with outlook express, or Thunderbird, or any webmail, but if I open the email with Outlook 2003, I can't see the images, I just see a small box (I send 1 image) with inside the path of the image. The image is embedded in the message, it's not a link. <?php $header = "From: Sender <sen...@domain.org>"; $header .= "CC: Altro Ricevente <blabla...@domain.net>"; $header .= "X-Mailer: Our Php"; $boundary = "==String_Boundary_x" .md5(time()). "x"; $boundary2 = "==String_Boundary2_y" .md5(time()). "y"; $header .= "MIME-Version: 1.0"; $header .= "Content-Type: multipart/related;"; $header .= " type="multipart/alternative";"; $header .= " boundary="$boundary";"; $messaggio = "If you read this, your email client doesn't support MIME"; $message .= "--$boundary"; $messag .= "Content-Type: multipart/alternative;"; $message .= " boundary="$boundary2";"; $message .= "--$boundary2"; $message .= "Content-Type: text/plain; charset="iso-8859-1""; $message .= "Content-Transfer-Encoding: 7bit"; $message .= "Alternative message in plain text format."; $message .= "--$boundary2"; $message .= "Content-Type: text/html; charset="iso-8859-1""; $message .= "Content-Transfer-Encoding: 7bit";.....
View Replies !
PHP-created Images
I've been wondering - how do I make dynamic images in PHP (example - the PHP and Zend logos when you do phpinfo().)? I have seen it done on several websites and I want to do it. Also, is there a correct way to use PHP to retrieve images? The only way I've ever got this to work is using require(). Here is what I did (note: it only works with ASCII encoded images, otherwise PHP errors): <?php switch ($imgnum) { case "1": require ("/home/img/menubutton.gif"); break; case "2": require ("/home/img/userprfl_bt.gif"); break; case "3": require ("/home/img/srch.gif"); break; //etc... case "": default: require ("/home/img/error.gif"); break; } ?>
View Replies !
Created A Php Upload Using Mac OS X
Is it possible to create a PHP uploading file so that I can place images/text into a destination that I have assigned "write-only?" If so, could you point me to a URL (URI) or sample code that tells me how to copy the file into the folder I want on my Mac OS X.
View Replies !
PHP Session Created
I have a problem whereby each time I reload a page a new php session is created in my temp folder. Needless to say that sessions are not passed from one page to another. I've been searching for the past two days bugs on php.net and php.net page on session seem to give info but it is not working for me.
View Replies !
Last Indexed Created
I trying to find the command which tells you the last auto index after an insert query to a database, i know there is one i sae it yesterday, just cant find it again today.
View Replies !
Created By Mkdir()
I used PHP to create a new directory, lets call it "newdir" within the "test" directory on my server. That worked fine, and so because I was only exploring the mkdir fuction I then deleted newdir. Looking at the server through FTP, the test directory is now empty. However when I try and delete test I get an error saying that the directory is not empty, so I can't delete it. Is there some behaviour of mkdir() I don't know about that means there is some kind of "memory" of the newdir directory.
View Replies !
Files Created With Php
You know when you create a file using php, it creates the file under a different owner, and you can only delete that file using php or if you have root access. Is there anyway I can get around this? I don't have shell/root access, only ftp so please keep that in mind. As stated above, i'm assuming this is quite common for people that are on a shared box and I would like to know if anyone had any tips.
View Replies !
Uploaded File Ok But Not Created
I'm trying to perform a very simple file upload page and everything seems to go just fine. The $_FILES var is populated with valid data (file size, name, mime type, even from a win remote computer) but the file just doesn't exists... It points to /tmp/php[random garbage] but there's no file starting with 'php'. /tmp is world-writeable so I don't see what the problem is. PHP Code:
View Replies !
IE Won't Display Gif Created By GD Threw Php.
So if I create a gif image using the source below the image won't display at all in IE. I just get a red X. It displays right with Firefox and it also displays okay if i open it up in Paint or *name your image software here*. Why won't it display in IE? Is there something I need to do special to make it work? #!/usr/bin/php <? $DOTS = 5000; $WIDTH = 6300; $HEIGHT = 6300; $im = imagecreatetruecolor($WIDTH, $HEIGHT); for($i = 0; $i < $DOTS; ++$i){ imagesetpixel($im , rand(1, $WIDTH - 1), rand(1, $HEIGHT - 1), imagecolorallocate($im, 250, 250, 250)); } imagegif($im, "../public_html/map.gif"); imagedestroy($im); ?>
View Replies !
Problems In IE With Created Gifs
Wondering if anyone else has had problems with gifs created by php or if anyone sees a problem with this code. Symptom: created jpegs work fine and created gifs work fine in Netscape and Firefox and when directly viewed. IE displays gif fine *via internet* BUT off of a CD or local HTML file it won't display the file. I have run a dozen gifs through the process and it has happened to every one of them. function thumbnail ($src_file, $path) { $orig = $path . '/' . $src_file; list($w,$h,$type) = getimagesize($orig); if ($type == 2) { // jpeg $src_img = imagecreatefromjpeg("$orig"); $name = "thmb_" . $src_file; $thmb_and_path = $path . $name; if(!file_exists($thmb_and_path)) { $image_info = getimagesize($orig); $src_width = $image_info[0]; $src_height = $image_info[1]; $dest_height= 80; $dest_width = ($dest_height/$src_height) * $src_width; $quality = 30; $dst_img = imagecreatetruecolor($dest_width,$dest_height); imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $src_width, $src_height); imagejpeg($dst_img, $thmb_and_path, $quality); chmod("$thmb_and_path", 0777); imagedestroy($src_img); imagedestroy($dst_img); } } else if ($type == 1) { // gif $src_img = imagecreatefromgif("$orig"); $name = "thmb_" . $src_file; $thmb_and_path = $path . $name; if(!file_exists($thmb_and_path)) { $image_info = getimagesize($orig); $src_width = $image_info[0]; $src_height = $image_info[1]; $dest_height= 80; $dest_width = ($dest_height/$src_height) * $src_width; $quality = 30; $dst_img = imagecreatetruecolor($dest_width,$dest_height); imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $src_width, $src_height); imagejpeg($dst_img, $thmb_and_path, $quality); chmod("$thmb_and_path", 0777); imagedestroy($src_img); imagedestroy($dst_img); } } return $thmb_and_path; }
View Replies !
Folder Created, But No Access
thats an error i try to solve for quite a while already but didn't find a solution yet. My problem: I'm writing a little cms, that should create a folderstructure, so that you can put files in via ftp. My script (simplified): mkdir("00000031",0777); // creates a folder named with the id of a database-record e.g. 00000031 chmod("00000031",0777); // sets the rights again to be sure, because i experienced problems with mkdir not doing it sometimes in the past chdir("00000031"); // should change to the folder but leads to: Warning: SAFE MODE Restriction in effect. The script whose uid is 611 is not allowed to access 00000035 owned by uid 60000 in /[...]/admin/admin.php on line 85 Its clear, the script belongs to me (user 611) but the folder belongs to the PHPuser 60000. The Trial to solve this using mit (chown("00000031",611); ) unfortunately leads to: Warning: chown failed: Operation not permitted in /[...]/admin/admin.php on line 84 What can i do in order to get access to the folder, for putting more folders and files inside?
View Replies !
Populate A Table That Is Already Created
I'm trying to run some script to populate a table that is already created. When I run the below code I am getting the completed message at the end, but my data is not going into my table....is there something incorrect with this code that is causing the issue? Code:
View Replies !
Cant Use Include In A Created Php File, Why?
I run the below code to create a new php file $fp2 = fopen("a.php", "w"); $P1= "<?php include ("template.php"); ?>"; fwrite ($fp2, $P1); fclose ($fp2); when I then display a.php in ie, I get a blank page if I copy a.php to my computer, then ftp it back, I get a full page of text and images as expected.
View Replies !
Way To Have Variables Be Created Dynamically.
I know there's a way to have variables be created dynamically. What I'm trying to do is to pass information about products to PayPal, but I don't know how many products are going to be in each cart. It could be 1 or 100. I need to create a variable who's ending number changes depending on how many products are in the cart. How do you have those created dynamically? I need the information to be passed through hidden variables via an HTML form as well.
View Replies !
Permissions On A Folder Being Created
Does anyone know why the folder being created here ends up with the permissions other than 777? $userdirectory = "./users/$uname"; mkdir($userdirectory, 0777); I want the folder to be 777 and it is not giving this permission
View Replies !
New Table Created From Variable
Is it possible to create a table in a mysql database using a variable that originated from a form? I've searched the net for some info on this, but have had no success. Basically I want an admin to be able to set up a weekly round of football, and have a new table created for that round, based on teams set up each week using a form. The admin would enter the round number, and that would be the name of the new table. The teams listed in the form would simply be posted in the table after it is created with a game ID. So far, I only know how to create a table by running a sql query, but the admin won't know how to do that, I'd rather if it could be done using a form.
View Replies !
Functions Created In Eval()
I am trying to be able to execute portions of code stored in a database using eval(). My question is, if I create a function inside of an eval() statement, can it be executed from code outside of the eval statement. For example, if I have the following code in my database: function test() { echo 'test'; } And retrieve it from the database as $test, and have this code: eval($test); test(); Should the function call work correctly? The reason I ask is because when I tried to do this, I got a "Call to undefined function:" error, and I'm trying to figure out if it's something I did wrong, or if I just can't do that.
View Replies !
Dynamically Created Link
I have written a script that will echo dynamically created links, however I am having trouble getting these links to open in a new window. Here is the trouble code: echo "<hr> <a href={$row['url']}?sid={$row['id']}$sid>target="_blank" {$row['dname']} </a> I know the problem is that php sees target="_blank" and therefore thinks I am trying to create a variable named "target". So it's giving me an unexpected T_STRING error. How can I format this so that php understands what I'm trying to do? Also, I can't set all links to open in a new window, as there are other links on the page that should not generate an additional window.
View Replies !
Created A Search Function
i would like created a search function the seach the html file with the content inside. can anyone give me some idea? it not only in one page, but a lot of html file and inside each file are fix contents. how can i done it? another problem but also search funtion problem. this search function was match the word in database with the keyword. when the user enter a keyword, firstly we need to separate it to individual word add with original keyword and recontruct all possible order of the keyword ??? then jz using query to match with contents in database? if i want to detect duplicate content based on two fields in database, then i need to recontruct all possible order of the keyword user enter, then using query to match it, isnt like that? how can i make the search result that most related in the top?
View Replies !
|