Including Pages In Pages
When including a page inside another (include('page.php')), is it bad for
the second document to also have <head> and <body> tags etc? Im using
iframes currently,
and it works, but getting the page to match the content
is kind of a javascript hack that only works after the page is loaded, not
counting the images. So the new page loads, doesnt fit the old page size,
and its changed.
View Complete Forum Thread with Replies
Related Forum Messages:
Including External Pages
I've started a del icio us clone web site. I wanted to attach a small "if you like this site bookmark now" message at the top of the external page when anyone click them. I will reformat the outgoing links from URL to GO.php?URL=URL: I try require() first. At go.php when I call require("$URL") page shows up but relative links and images are broken. I try iframe but I don't want my message always displays (would be ugly). I don't want to use frame either.
View Replies !
Searching A Website - Including All New Added Pages
Basically, i need to write a php search function which will search all our pages in the directory depending on user keywords.. the thing is, this could be difficult as we may have 8000+ dynamic pages (these would also need searching) plus we will be adding more and more of these dynamic pages (so wont have a list of page names).
View Replies !
Query Strings, Extract() And Including Pages
I wanted to do: include('page.htm?id=12&foo=bar'); But since I can't (and don't want to make another seperate HTTP request with include('http://...')); I was wondering if there's a function similar to extract(); that can handle a query string as input, so that I could: $id = 12; $foo = 'bar' include('page.htm'); I am using this on a 'processor' style page to interperet URLs as http://foo.com/bla. It consults a database to manage a large number of URLs to their pages.
View Replies !
Avioding Expired Pages, & Carrying Data Accross Multiple Form Pages
I have a checkout/order form that consists of 6 pages, all PHP. The are linked to one another, like, after the user finishes page 1, they proceed to page 2, etc... The first two pages are submitted by a GET link, so those are not in my question. The next 4 are submitted using a <form>. Throughout all of the pages, i would probably have about 25-30 variables, things that the user has to fill out. I have two questions, 1. What would be the best way for me to keep track of all the data moving throughout the pages, like storing it from page 4, and i still need to access it on page 6. 2. I don't know if anyone could help me here, but does anyone know of a way to code around those ugly "page expired" pages, because of a submitted form. If a user needs to go back, which most likely they will, is there some sort of way for me to skip the expired page?
View Replies !
Converting Html Pages Into Dynamic Pages
I built a website in html, using Dreamweaver. I need to have a database built within these pages and the person who is going to do it told me that they will have to convert all my html pages into dynamic pages (php). Is it complicated to do this or do I just have to save my pages in php instead of html in Dreamweaver ?
View Replies !
Convert The PHP Pages To HTML Pages
how to Convert the PHP pages to HTML pages. provide me the specificaly coverting Codes or Scrpit to Converted the PHP Page to HTML page. If there in any software to convert the PHP Page to HTML pages please specify.
View Replies !
Custom Error Pages For Web Pages?
A site has the following htaccess commands in it for custom error pages: ErrorDocument 400 /error.php?code=400 ErrorDocument 401 /error.php?code=401 ErrorDocument 403 /error.php?code=403 ErrorDocument 404 /error.php?code=404 ErrorDocument 405 /error.php?code=405 ErrorDocument 500 /error.php?code=500 ErrorDocument 501 /error.php?code=501 ErrorDocument 502 /error.php?code=502 ErrorDocument 503 /error.php?code=503 ErrorDocument 504 /error.php?code=504 So, there is one error page with php code in it. Depending on the error code that Apache sends, it will display the correct error message on the website. However, if I type in http://www.domain.com/fdfdsfsdf.html I will get the error page correctly. However, if I type http://www.domain.com/fdfdsfsdf.php, it does not use the custom page, but using the default apache not found page. Is there something else I need to add to the htaccess file to make php errors use the custom page? I was told by the owner of the hosting company I work at that every time apache sees a .php extension, it automatically assumes it is a script and will not parse the correct error message for it. Does anyone know how to get .php extensions to use the custom error page on an apache server? Is there something else I can add to the htaccess file to facilitate this?
View Replies !
Sending People To Specific Pages That Are Coming From Specific Pages...
I want to show some specific pages to people that comes to my site from specific urls, I know the variable $_SERVER['HTTP_REFERER'] will be used but how? For ex if the visitor comes from a site that is like: I want to send this person a specific.php . I used below code but not worked: <?php if($_SERVER['HTTP_REFERER'] == "www.cominghost.com" || $_SERVER['HTTP_REFERER'] == "cominghost.com" || $_SERVER['HTTP_REFERER'] == "www2.cominghost.com"){ // Specific page html goes here } else { header("Location: index.php"); } ?> This code not worked for some cases like if the visitor comes from http://www.cominghost.com/account/targeturl.php or http://cominghost.com/account/targeturl.php Ok I know the if statement not working but How?
View Replies !
On The Fly Php Pages
what coding you would use to create pages based off 1 template. For example http://www.mysite.com/index.php?page=1 http://www.mysite.com/index.php?page=2 http://www.mysite.com/index.php?page=3 So that I can edit changes to all my pages just be editing index.php. I don't have access to a sql database so I have tried different ways of using the echo command but no luck. Does anyone know how to do this?
View Replies !
Utf-8 Pages And Php 4.1.1
I'm running into a problem with php 4.1.1 on IIS (XP Pro version). For example writing a page test.php that starts with <?php session_start(); ?> <?php echo '<?xml version="1.0"' ?> <?php echo ' encoding="utf-8" ?>' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><!-- InstanceBegin template="/Templates/stdPage.dwt" codeOutsideHTMLIsLocked="true" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> .... and saving the test.php in UTF-8 format in UltraEdit-32 or SciTE, then running the page, there's a complaint for session_start() about headers/page data having already been sent. If the same page is saved as "plain" ASCII, it works. Any ideas how to get an UTF-8 encoded page to work in php 4.1.1, without upgrading?
View Replies !
Web Pages
i am trying to make a homepage in PHP but something along the same lines as the frames that you can use in HTML, so it allows you to have the different frames for opening different pages, but i was wondering how i would do that within PHP.
View Replies !
ASP.net Pages To Php Pages
Application developed on ASp.net, but now to be replaced with commercially available php application for purely commercial reasons, i.e. business building rather than application devlopment. Currently, domain is hosted in a purely MS environment , it has many pages rather well ranked in some SE's so we want to preserve those rankings .
View Replies !
Used Across All Pages
Given my web application has some codes that only need to be executed once(eg.configuration used over the whole site), but every php script which needs that config seems to execute that once to get configuration when a request comes. Is there any mechanism that can make a script processed only once and all other pages can use its output?
View Replies !
Pages Like This: *.php?do=something
I was wondering how peoples make scripts where you can show different things depending on the URL, but in the same PHP page exemple.php?myoption=showsomething would show something and exemple.php?myoption=showsomethingdifferent would show something different where could i find a begginner tutorial or something for that?
View Replies !
Around 40 Pages
My site has 2 languages English and French, now what is needed is that if the User is in abcd.php page which is in French and clicks on the English link he should go to the same abcd.php in English Language. How to do that is it possible cause I have around 40 pages means (80 in 2 language) .
View Replies !
PHP Pages
I'm building a form that gets processed on a second page, but upon processing failure should go back to page 1 and repopulate the form. My problem is that the data is too big to be base64 encoded and passed along the url. Is there a way I can have page 2 go back to page 1 and pass back the data without causing a 414 (url too big) error?
View Replies !
ASP Pages From PHP
I want to develop some code in PHP that is part of an ASP application. I am wondering if there is anyway to get the session ID of an ASP page (or any other scripting language) from PHP. I assume that session id's are kept as cookies on the user's desktop. If that's the case there should be some way of retrieving them.
View Replies !
Add Pages
I have used the search and also googled for this and can't seem to find anything relevant. Basically what I would like to do is auto add pages to what I suppose would be considered a guestbook script.(php and mysql) I understand how to LIMIT the results for a page but how do you auto generate extra pages? For ie: Say I have 20 records in my db that I wish to display, 10 records on each page. Now I know I could easily add a second page using conventional means (page1.php and page2.php) but I would like it to auto generate a third page link when another record is added. What I am trying to say is ONE page and links to other pages are generated when more records are added.
View Replies !
GUI Web Pages
My job is to automate things where in my web application was designed with php pages and mysql as DB in the backend. I should either use shell scripting or PHP scripting to get this done. I am not sure is there any way of doing. so, I really googled and got some tools which records and playback the actions but this is not useful for me as it won't make any logical decisions.
View Replies !
Php To Pdf Multiple Pages
I can write a page - no problem. when I start a second page I cannot open second page. at the time of a page break I have tried: php_close_page($sessionname) php_open_page($sessionname,x-coord, y-coord) and php_close_pdi_page($sessionname, $pagename) php_open_page($sessionname,x-coord, y-coord) and just php_open_page($sessionname,x-coord, y-coord) It always opens and writes the first page but hangs up when it tries to open the second page.
View Replies !
Secure Pages
I have a login system that checks the database for auth and sends them to the destination according to auth. Now what I need is some way to secure the pages so you cant go straight to the pages by typing it to the browser. I would like for you to get directed to the login page if you try to go straight to the page(s). Is there some code I can put to keep from viewing the page(s) without logging in first.
View Replies !
PHP In Html Pages?
I have a problem. I need to include a php script in a simple html document on a server that does´nt support php. I´ve tested following but it does´nt work.. <SCRIPT LANGUAGE="PHP" SRC="http://www.domain.com/include.php3"> Does anybody know a solution for this problem or is it impossible?
View Replies !
Can I Expire Pages Myself?
I was wondering weather it be possible to have the browser say page expired or if it is posiblw to have a script that will detect the browser back button has been pressed.
View Replies !
How To Redirect Pages
How can I redirect the URL if URL is underlined. I mean, I made alink to the site with URL. How do I change the site with URL, so that it redirects the browser to the page defined by that URL?
View Replies !
Members Pages On The Fly?
I would like to make a members site, where my members can update their personal page via the web through forums. The pages would be generated by a template. I would also like these member pages to have id=10 so that it is easy to link up.
View Replies !
Caching Pages With Php
In this post I will try to give a view of what is the custom caching with php, why and how we can use it.In the modern days, most of the sites are database driven. That means that your site is actually an application which retrieves data from a DBMS ( database managment system, eg MySQL) , parses the data and shows the result to the user. Most of these data are usually don't change frequently or don't change at all, and the reason that we use the database is that we can easilly update the site and the content.A problem that this process creates is the server overhead. Every time we execute a query in the database, the instance of our script will call the DBMS, and then the DBMS will send the results of the query. This is time consuming, and especcially for sites with heavy traffic is a real big problem.How we can solve this problem?There are two ways to solve this if you want to make your site faster. First is optimizing the quesries, but we will not talk about this at the present article. The second and most valuable is using some kind of custom caching technique. Custom caching with phpFirst let me explain the idea behind custom caching. When we have dynamic pages that their data is not updated frequently, we can use a 'system' that will be able to create the page, and then store it for later use. That means that after the page's creation, our application will not run the queries again in order to display the page, but it will show the cached one. Of course this system must be able to keep the cached pages for a time period that we will set.Let's code itHere is a simple class that will do the job. Let's see the code first:
View Replies !
Updating Pages
I have embedded a PHP script into an IFRAME that queries a MySQL database to post comments. Comments can be added, and in theory, posted immediately. They do if you hit F5, but as soon as I shutdown the browser, go back to the comments page, the new comments are not there, until I hit F5. I've deleted all the temp files from my computer, so it shouldn't be that. I've tried contacting my hosting company, but they have nothing useful to say.
View Replies !
Caching Php Pages?
HOW to make my pages freshly loaded by default. this is a problem when pages get cached that query databases because when you go there you get the cached page as opposed to the page updated with the database's info. how do you get pages to automatically load themselves from the server, not the cache?
View Replies !
Redirecting Between PHP Pages
Two inter-related questions: If I'm in PHP page a.php, and I want to switch control to page b.php, the only mechanism I've come across is to use header('Location: someURL") ; This has two drawbacks - it seems inefficient to me - you essentially have to "bounce" a request/response off the browser to switch between PHP pages - leaving and returning to PHP just to switch pages, and also it uses the GET method and, I'd assume, therefore restricts you on the length of the URL and therefore the number of name/value pairs you can send before they get truncated. Q1: Is there an internal PHP server-side page redirection mechanism that would/could provide a more efficient mechanism for switching between PHP pages? Q2: Alternatively, is there a POST equivalent to header("Location:") that I could use from within PHP to redirect between pages, so that the number of name/value pairs I could send is unlimited?
View Replies !
PHP 4 W/ IIS 6 = Blank PHP Pages
I've installed PHP4 in isapi mode on Win2k3/IIS6. When I try to access a PHP page, it comes back blank. The odd part is that if I just a test page with phpinfo() in it, I get results. I've tried everything and spent the last 2 hours googling for a solution. Any ideas on why this would be happening?
View Replies !
Redirection Of Pages In Php
First it check the text field, if the text field are not matched with your database values then after cliking the submit button it will show the error message in the same page , but if it matched then it will redirect to the specified page/link.
View Replies !
Generating Pages On The Fly
i have a db lthat i want to publish. it''s full of articles and i want it to work this way: there are ten categories (sex, health,....)once you click one of this category you go to a page where there are some articles (about sex, about health,...). at this point is my problem. i'd like to find a way to click an article and have the code generating a new page for me with that article. is this possible? to eplain: this is sexuology.php with these: article 1 article 2 article 3 once i click a new page is generated on the fly to let me read the whole article how can i do.
View Replies !
Encrypting PHP Pages
I have a script that I made for my intranet that charges clients credit cards via authorize.net. In my script, I have to write the username and password in plain text. I do this with mysql connections in an external php file, but feel pretty uncomfortable doing this with the credit card processor just in case anyone gets a hold of the code. Is there a way to encrypt the password for the login without ever needing to display the plain text?
View Replies !
Search Pages
I am making an application that lets you upload pics to a server and also adds the directory to a DB. Now I just need to display the pics and I want to do it a page a picture. Kinda like a search page. AV or Google style. But instead of a link its a pic and then you can choose to go to the next one by clicking on a link. But the whole time it's one dynamic page pulling info off of a mySQL database.
View Replies !
Using Variables From Other Pages
Do you know how can use some variables I used in the last pages? I mean, In my first page I gave a variable some value that I used in the second one. Now that I change to a third one, I need that variable again. but if I try to print it there's nothing. How can I get it again? I don't have it saved in a table.
View Replies !
Crawling Web Pages
What I’d like to know is if there’s a feature in PHP that can read web pages, and index them.? I’d like to make a search feature for a forum, and have it crawl the forum pages and index certain words that I’ve specified (probably just nouns) and tally them up. The only thing really stopping me is the function to read the pages.
View Replies !
How To Get Object In Pages !
actually I am using php-java bridge to call some functions of java from my php page. The value returned are encapsulated in some object and data in that object are fetched from database. What I want to do is that when I post my page to same page or other page I again need that data (or object). I don't want to hit the database again for same values. So how and where to set the object values. I think I can set it in request object like in java we do (request.setAttribute(String, Object)). I am focibly setting the values like $_REQUEST['list']=somelistObject. But I am not getting the data after submission of page. same operation with $_SESSION also is not working. If somebody knows how to do this,
View Replies !
Creating WAP Pages With PHP
I am busy developing a site that will need to be accessed by both WAP and normal browsers. The normal browser access is OK and the site is finished for that - now comes to big problem: I need to create content based on a MySQL database for use on WAP, my only means of accessing the MySQL db is using PHP from a Linux server. I've tried a test that is supposed to display Hi on the WAP browser. This does not work it gives me the following error: Unsupported content type: text/html The code below is the original code I tried. After that I included Header("Content-type: text/wml"); with Content-type changing from text/wml to text/xml to xml to wml to xml/wml to no avail. Code:
View Replies !
Convert Htm Pages To Php
At present the client has a site constructed of htm pages. The pages now need to include a php script to be run at a particular point on them. Do i have to convert all pages from .htm to .php? All htm pages at present are connected to a template. Converting them to php might disable the template connectivity. Is there a way to include the php script on the web pages and maintain template connectivity?
View Replies !
Importing Pages
I've written a content management system that I'm now selling to my customers. It's very nice when we have a blank canvas of a site, but a pain in the arse when there is already a site in place. What I'm in the process of *trying* to put together is a script that would do the following: A simple form where you put the address of the site with the static pages The script then spiders through the site, takes everything between <body> and </body> and chucks the rest away It would then take out all class definitions and all embedded styles like font tags etc but leaves tables, <p> <H?> etc This would leave a very plain page of HTML that would be inserted into a database. CSS would control the fonts etc. I'm aware that there would need to be some tidying up if there was any javascript or anything and also some basic formatting. What I want to know is 1. Has it been done and, if so, where might I find something like this 2. Might it have any commercial value to other developers? Regarding 2, I'm thinking how much time something like this might save me if I have to convert anything more than a few pages of static HTML into something that I can put in a database.
View Replies !
Best Way To List Pages A - Z
I now have my emulator site up and running, no longer html but php! Even my vote script now works, thank for all your input. Now I want to have roms on my site for download, but it's a fair long list so you have to devide in sections a - z or something. Can this be done in a way to create those pages with php/mysql instead of have to write html files for every emulator roms page from a to z? If anyone have done this before I would like to here what the possibilties are.
View Replies !
Multiple Pages
I am working on a php script that would allow members to post artices on the homepage. I think I have that pretty much down, what I don't know how to do is to limit the articles posted. I only want, say 10, to show up on the hompage, then users can click next page to see the next 10 articles. How would I do this? And how would I beable to make a next page link, too? Also, this might be a bit much, but how would I make an administrator page, that allows me to authorize which articles are posted, and which are discarded? Just a simple one that says, post or delete. I can do the rest that would let me edit etc. but I just don't know where to start!
View Replies !
Error Pages
When a user clicks on a link on my page that points to a non-existing page he will be redirected to error/404.php (by .htaccess) How can I find the link that he was trying to follow, and the page on which that link was. If a user entered a non-existing url he will also be redirected but then only the wrong url can be fetched. How can I do that?
View Replies !
Removing The .php From Pages
Hi i am new here we run a website called www.example.com and i was wondering if it is possible to remove the .php from the end of a address For example www.example.com/newsinbrief.php, it would be nice it I could have it as www.example.com/newsinbrief Is this possible does anyone know how to do it and if so where i could look for the code advise etc.
View Replies !
Titles In Php Pages
First let me say that I am a rank amateur and am learning as I go. That said, I am using a php scripted page to call several different html pages as content. This makes it very easy to edit the look, header, etc...of the 200+ pages on my site but keeps them from having good individual titles that the search engines like. If I use a "create title" tag I do get individual titles but they show the entire url (http:......com/php?x=....) and I would like plain text in the header. Are there tags I can use on text in the html pages (product names) to extract them to the title? If so what would I put in the php page to call the title from those tags.
View Replies !
Fetching Web Pages
i need to write a php script that fetch web pages and use proxy authentication (i use LWP in perl). anyone can shed some light on where to start (pointers, tutorials, source code, etc). a simple example would be great.
View Replies !
Protected Pages With Php
Im having trouble with a password protected page. My problem is how do i define the session for the whole page. this is what i have after someone logs in. But don't kno if its correct/Also do i have to include the login form again incase they just try and type in the url to get in? <? session_start(); ?> <html> <head> <title></title> </head> <body> </body> </html> If someone a bit more fluent with php could lend some advice it would be great.
View Replies !
Similar Pages ...
I have about twenty pages now, all with various scripts. All of them are different but the header and the footer are always similar eg. .....<HTML>...<HEAD>..<BODY>.....<TD> {content} </TD>end of file stuff</html> Should I put the front and the end in a special function so that I can change all of them at once?
View Replies !
|