Photoshop palette
Creating a custom Swatch
Photoshop training

Customizing Max Interface
Learn how to customize 3d Studio Max interface and viewports
3d Studio Max

Learn Flash
Start to learn Flash. See some important features to start learning this imaging software.
Flash Training

Dreamweaver Enable/Disabled script
How work with Browser with Javascript disabled
Learn Dreamweaver

Understand Sessions
Learn how php sessions work
in Php programming

Redefine tags and create classes with Css
manage different types of html tags, classes and styles
Cascading Style

navigation

Share Tips

Php file()

file() reads a file line by line. Every line becomes an element of an array array file (string filename [, int use_include_path])

 

Affiliates

:: Planet Renders ::tutorio.com free webmaster tutorials

Bookmark

del.iciou.us icon Technorati Ma.gnolia send this page icon

Like this site? Digg it ;)

Php Script - Send this page to a friend - Page 1

A php walkthrough that shows how to realize a useful php script to an url of your site via mail.

First of all, we need just two pages to realize this script, one (but the total number depends on you) with the send this page script, and a page that we will call sendpage.php with the form.

If your site uses include_once() function, include this few line of code in your functions page, if not just add this code only in the page/s to send the exact url via mail.

Please note: the script and the sendpage.php page have to be in the same directory, if not edit this line <a href=[edit-here]sendpage.php

The code:

<?php
$myurl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo "<p><a href=sendpage.php?myurl=" .$myurl. ">send this page to a friend</a></p>";
?>

Please note: some browsers may cut the code and give you the impression of two lines of code instead of one. So, copy and paste the highlighted portions of code in word or notepad.

$myurl is the variable that stores the full url.. i.e. the one that you see in your browser, use myurl or a variable name of your choice but avoid $url ‘cause it is too common. Another variable with the same name in your site usually forgotten is ever possible.
$_SERVER['HTTP_HOST'] returns your domain name ex. www.yoursite.com
$_SERVER['REQUEST_URI'] returns the url from index.php/dir/page

Go to page 1 - 2

copyright © 2006-2007 http://www.cagedflame.com 3 on line The Host Choice