Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Retrieve Page Address


i have a website www.myweb.com. I want to retrieve the page address in a php variable in each page. Like, when anyone enter www.myweb.com/page1.php, then a variable (say $site) in that page will return the address, i.e. I want echo $site;  //return www.myweb.com/page1.php or page1.php Is it possible in php?




View Complete Forum Thread with Replies

Related Forum Messages:
How Do I Retrieve A Page From A Web Site?
Q: How do I retrieve a page from a web site? A: Pass a URL to file() or file_get_contents(). The former returns the contents as an array of lines. The latter returns the same as string. Code:

View Replies !
How Can I Retrieve All The Page Name With Arguments Passed To Itself?
How can I retrieve all the page name with arguments passed to itself?

Using Php_Self tag with the following URL:

http://localhost/workplaceGSA/index...m_total_count=7

returns:

http://localhost/workplaceGSA/index.php

I want http://localhost/workplaceGSA/index...m_total_count=7 as is.

View Replies !
Retrieve Random String From Page Using CURL?
I need to use cURL to get a page, then have it decrypt a random encrypted string, it's just on the page. How might I do this? The encryption type is base64.

View Replies !
Restricting A Page To 1 IP Address
I just made an Upload page on my website and I want it to only work on my IP Address... How do I do that?

View Replies !
Multiple Page With Same Address
I have several pages which supposed to execute in sequential order,reserve.php,reserve2.php,reserve3.php,...How could I resolve them in same address as reserve.php and execute in proper order?

View Replies !
Fetch The Page Address
In a page, for instance /article.php?id=34 , I have included another file; showgraph.php. This fil requires parameters, like ?graph=5

Inside showgraph.php there is a link that points to ?graph=5&rows=3 , to make the same file reload with new parameters.

When showgraph.php is called from index.php or another file that does not requires input parameters, this works just fine; the page index.php?graph=5&rows=3 loads ok. Code:

View Replies !
URL Of The Page Display In The Address Field?
When redirecting from one page to another using the header function, the URL from the previous page remains in the browser's address field. How do I get rid of this and have the URL of the page display in the address field?

For instance, if I am at http://abc/index.php?user=abc and have a header function in that particular script that redirects to http://sano/home.php, how do I get http://abc/home.php to show up in the address field instead of http://abc/index.php?user=abc?

View Replies !
Determine Complete Address Used To Get To A Page
In particular, how dow I know if a page was requested using http or https?
I have some pages that need https, so if they were requested via http, I
need to redirect using https.

View Replies !
PHP Page That Displays Html Based On The Address Enterd
I would like to have a PHP page that displays html based on the address enterd. For example:

index.php?example=a would show a page with <body>Example1234</body> whereas index.php?example=b would show a page with <body>Example5678</body>.

I've done this before, but I can't remember the code I used.

View Replies !
Sendmail Page: How Do I Hide My E-mail Address From Spam Bots?
how to make a sendmail script without having to place my e-mail out on the web page where a spam bot can get to it? I need to hide my e-mail address on the hosting away from the spam bots.

View Replies !
Use A Script That Has A Mail() Function And The Address Is To An Address Of The Same Domain As The Site
I just moved my php site to a new host. The previous host and the new one are both running the PHP 4.3.11. The sendmail path is the same.

If I use a script that has a mail() function and the address is to an address of the same domain as the site, it works ok. If it is to an outside address, it disappears. Though it returns it was a successful send.

View Replies !
Mail() Bounces To Server Address Instead Of From Address
All email sent from php mail() that bounces is being returned to my servers admin email address instead of the "From" or "reply-to" address.

What needs to be put in my header code to ensure that this does not happen?

View Replies !
Send Header Info To A Page, Retrieve Response And Send That As Header
I am sending a header to page.html from sender.php using fgets(). I am then trying to retrieve that page's response, and set that as a header in sender.php in order to set any cookies etc.... that page.html might want to set. Right now I am using the following code:

View Replies !
Email Address Is Invalid Address
we are trying to use it andwe give it a perfectly valid "From address" and it comes back saying  the email address is invalid  address. Any ideas?

View Replies !
Send Email - Page Where You Enter An Email Address And Click Send.
I am interested in creating an "email -this" type ability for a website. I am sure most people have seen an "email -this story" type link that is standard on most news web sites. You click such a link and then it takes you to a page where you enter an email address and click send. The link for the story and the title are not editable. Does anyone know where I can find example code of how to do this with php, and any explanation of how this works.

View Replies !
How To Use PHP To Retrieve Data From A PDF
I am looking for a tutorial, script about how to use PHP to retrieve data (Ex: filled customer input in a PDF file) from a PDF file and store it as a XML file.

View Replies !
Retrieve Formname
In my PHP script I want to put the name of the form, i'm currently in, into
a variable.

So far I haven't found an answer!

View Replies !
How Do I Retrieve $Variable From URL?
How Do I Retrieve $Variable From URL? I am designing a user registration section for a web site. "Page One" below contains excerpts from the user input form and "Page Two" below contains excerpts from the script that 1).inputs the data into the database and 2).sends an e-mail with the $UserName variable appended to the URL. Pages One and Two work just fine. Page Three is where I'm having the difficulty.

My question is this: How do I get the $UserName variable that is appended to the URL on page two (that is subsequently sent in an e-mail) to insert into the "UPDATE $TableName..." query shown below on Page Three? PHP Code:

View Replies !
How I Can Get Php To Retrieve The Directory
Can anyone tell me how i can get php to retrieve the directory i am working from (Home Directory)the reason i ask is i am getting a directory listing of my images folder and i dont want to have to enter the complete path to that directory (C:lahdahimages) i want to be able to just enter the images folder as my folder to retrieve.

View Replies !
How Do I Retrieve The Next Record?
I am searching the mySQL DB for a particular item num. When it retunrs the result I want to be able to go to the 'NEXT' and 'PREV' records in the order of the Table. Do I first need to put in an auto increment or index column?

View Replies !
Retrieve Body Tag
If I have a body tag that looks something like this <body id="home
page"> where each page on my website has a unique "id", is it possible
to retrieve the body tag in PHP and pass the id along as a variable?

View Replies !
Cannot Retrieve Data In Utf-8 From Php
I have a IIS server with php3 installed. I have SQL server database
and data stored in unicode format (nvarchar fields). In header of my
php I have the meta: <meta HTTP-EQUIV="content-type"
CONTENT="text/html; charset=UTF-8">.

I have the following problem:

- I trie to do a query using ODBC (version 3.525.1022.0) and SQL
Server odbc driver (version 200.85.1022.00). The query doesn't
retrieve information in utf format and accents and extra characters
aren't showed correctly.

- I trie to di the query usin native OLE DB. I use mssql funtions and
the problem is the same.

If I install php4 and I use "new
COM("ADODB.Connection",NULL,CP_UTF8);", then it works correctly.

Anybody knows if its posible to retrieve data from sql-server in utf-8
format using php3?

I see in other postings that odbc driver only accept utf-8 in version
3.7 or higher? Is it true? If is true, where I can download odbc
driver 3.7?

View Replies !
Retrieve All Pics From Url
I want to get all pics (.jpg) from a url and I use this code but sometimes
with some urls it doesnt work :(
Anyone can check it out?

$text = implode("", file($url));
$text = eregi_replace("<!--([^-]|-[^-]|--[^>])*-->","", $text);
while (eregi("[:space:]*(img)[:space:]*=[:space:]*([^ >]+)", $text, $regs))
{
$regs[2] = ereg_replace(""", "", $regs[2]);
$regs[2] = ereg_replace("'", "", $regs[2]);
$regs[2] = preg_replace("/(s.+)/" , "" , $regs[2]);
if(eregi(".jpg|.jpeg|.jpe",$regs[2])){
echo $regs[2]."<br>";
}
$text = substr($text, strpos($text, $regs[1]) + strlen($regs[1]));
}

View Replies !
Retrieve String From URL
i have the following URL : www.mysite.com/Rates/USA/1/China/2
i wana extract the two countries from this URL ( USA and China)
N.B: this URL is rewrited using mode rewrite.

View Replies !
Retrieve Arrays From URL
how would you go about getting an array form the URL?

can you just post it like this "domain.com/index.php?array=1,2,3,4

and then use: <?php
$array = $_GET['array'];
and then the array would read as:
$array[0] == 1
$array[1] == 2
etc...

View Replies !
Retrieve Info Via Id
How can I retrieve data from my database based on the item's id and how can I built it up on one page dynamically?

View Replies !
Retrieve Product ID
All i need is for the $productURL as shown below to recognise the product ID as set in my query.

PHP Code:

$result = mysql_query('SELECT  pd_name, MAX(pd_id), pd_thumbnail
                                        FROM tbl_product GROUP BY pd_id desc limit 1') or exit(mysql_error());
                        $row = mysql_fetch_assoc($result);
                        $productUrl = 'categories.php?c=17&p='. $_GET['pd_id'];?>
                        <a href="<?php echo $productUrl; ?>"><img src="<?php echo $row['pd_thumbnail']; ?>" border="0"></a>

View Replies !
Retrieve Empty Row
I'm trying to retieve all the rows in my table product_data where the column pd30 has no value inputed (Nul). I cannot syntax my recordset properly. Should I use !empty to locate the nul values or something else. here is where I'm at (I know this is wrong and doesnt work, but it gives the idea of what I'm trying to do): PHP Code:

SELECT * FROM product_data WHERE product_data.pd30 = !empty

guide me to fixing this?

View Replies !
Retrieve Images
I plan to retrieve images from database.. and arrange the images (let say I have 7 images) into 2 rows . in which the first row has 5 images and the second row has 2 images. How can I do that using PHP coding? Is it something to do with counter?

And I’m using phpMyAdmin as the database. I think that’s the purpose of phpMyAdmin. (correct me if I’m wrong). I’m not sure. ..and I’m only browsing my webpage on local intranet.

View Replies !
Retrieve Pdf Form
I created a form in adobe designer with a submit button, however, adobe refers to the submit button with a mailto: and we all know that mailto = spam. I tried to use xml, but that really made the form buggy. Here is the thread:

http://www.codingforums.com/showthread.php?t=113092

Has anyone ever retrieved a pdf form with php. It was suggested to me to retrieve the form server-side. I don't know php but now is a good time as any to learn.

here is what the form generated

<event activity="click">
<submit format="xml" target="mailto:myname@somewhere.com?subject=Submission From Registration Form To &quot;somewhere; (myname)" textEncoding="UTF-8"/>
</event>

View Replies !
Store And Retrieve PDF
I want to store pdf files in and then retrieve them from a MYSQL database.

I can do this with gifs and jpegs, but not with pdf. Can anyone point me to an appropriate turorial, please?

Please note that I do not want to store these ina diractory as it relates to a content management system for a website,m and the users may not have access to FTP.


View Replies !
Retrieve Results
I need to retrieve results from a mysql database into the HTML drop down select box. I have done so with the following code and it works fine: PHP Code:

<select name="semamount">
                            <? do {  ?>
                            <option value="<?php echo $row_sql['semprice'];?>"><?php echo $row_sql['semname'];?></option>
                            <?
                                 } while ($row_sql = mysql_fetch_assoc($sql));
                                      $rows = mysql_num_rows($sql);
                                          if($rows > 0) {
                                          mysql_data_seek($sql, 0);
                                           $row_sql = mysql_fetch_assoc($sql);
                                  }
                ?>
                          </select>

My problem is that as you can see from the code, the value is grabbed from a row named "semprice" and the display name is grabbed from a row named "semname". I would pass such variables to another php page that would capture the semprice and do a calculation but I dont know how to capture the select "semname". How would I also capture this part (semname) depending on which the user selected before being directed to the processing form.

View Replies !
Cant Retrieve Values From URL
I am making a file upload system in php which is broken down in two stages. Stage one uploads the file to the server using php, if this is successful, it goes to stage 2 which basically asks the user to input the title for this file to store in the database and also stores the file name in the same database.

The problem where I am stuck is when I try to send the file name from stage 1 to stage 2 in the URL (.php?filename=$filename). I just cant seem to retrieve it form this URL in stage 2.(retrieve the file name which is in the URL to pot it in the database along with the tile) I have posted the code below. Code:

View Replies !
Retrieve The Data
All i want to do is retrieve the data from this pull down menu. and print it on a different form. hear is my pull down menu what do u reckon

<body>
<form action="calender.php" method="post">

<?php

//make the months array 
$months = array (1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');

//make the days and years array 
$days = range (1, 31);
$years = range (2007, 2020);

//make that months pull down menus
echo '<select name="months">';
foreach ($months as $key => $value) {

View Replies !
Cannot Retrieve Cookies
I have setup a login form that will set a cookie, the cookie sets fine but I cannot retrieve me cookies for some reason. Here is the code: PHP Code:

setcookie ("userName", $_POST[userName],strtotime("+1 month"));
setcookie ("userPassword", $_POST[userPassword],strtotime("+1 month"));
setcookie ("userID", $row1[userID],strtotime("+1 month"));

Here is how I am trying to retrieve it: PHP Code:

echo "$_COOKIE[userName]";

Like I say, it creates the cookies (3 separate ones), so I know they exist, but won't display them.

View Replies !
Retrieve And Update
I am trying to retrieve, insert and update data between two different MySQL servers, one on the localhost and the other remotely-hosted. How is this done? Does it change the way in which you make a query?

View Replies !
Retrieve Infromation
I have one table1 with four fields (field1, field2, field3, field4) and table2
with two fields (field1, field2). As I would like to retrive information from table1 it will work:

$username=$_POST['fname'];

$query1 = "SELECT * FROM users
WHERE ime='$username'";
$result1 = mysql_query($query1) or die ("SQL error: $query -- " . mysql_error());
while ($row = mysql_fetch_array($result1))
{

$IDuser = $row["ID"];
$email = $row["email"];
}

But how to retrieve information from table 2 if this is another table and it should retrieve last record in this table2 where is $IDuser from table 1.

View Replies !
Retrieve Only Images
I'm retrieving all images in a section of my source code. I want it to skip all the images that have the id="blocker". I've tried using strpos to search for the id in the image src. I then try to skip the image with that id by using the 'continue' expression, but it's not working.

//retrieve all images within the above string
preg_match_all('#<imgs[^>]*srcs*=s*['"]?([^'"s>]+)['"]?[s>]#i', $matches[0], $images);
foreach($images[1] as $image)
{
$ider = 'id="blocker"';
$pos = strpos($image, $ider);


if ($pos === true) {
continue;} else {

echo "document.getElementById('randompic".$h."').src="".$image."";";
echo "document.getElementById("picaddress".$h."").value = "".$image."";";
.........................

View Replies !
Retrieve Data From SQL
I am totally green in PHP and have recently bought a script which I hope to modify to suit my requirements. I am trying to use a SEARCH button with 'built-in' conditons to call up data. Try the search function but as it requires a form to work, it does not suit my needs. What I am looking at is for my visitor to click on a button and the results are displayed.




View Replies !
Retrieve Data
I'm currently run the following script:

<?php
mysql_connect("**", "**", "**") or die(mysql_error());
mysql_select_db("**") or die(mysql_error());
$data = mysql_query("SELECT * FROM world_cup WHERE username ='$username'")
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
if ( $info['a'].$info['b'] == $info['c'].$info['d'] ) {
echo $info['e'];
}
?>

What do I need to change if 'a' and 'b' were on another table ie world_cup_scores?

View Replies !
Database - Retrieve It?
I entered into my database, I saw 53 records there, but no information is displaying in the rows. Could that be the many times I hit the submit button or is there actual data there and I need to retrieve it? If I need to retrieve it, how do I go about doing that.

View Replies !
Retrieve All Images From Db
i want to retrieve all images which are present in mysql table.i want to display 5 images per row.but when i fetch image it shows one image only.here is my code. how to solve this problem. Code:

View Replies !
Retrieve The Current URL
I am using this code to retrieve the current URL: Code:

View Replies !
Retrieve System
I would like to retrieve system information from many of the servers I manage. This information would include:

- amount of disk space on each hard drive
- amount of FREE disk space on each hard drive
- processor speed
- amount of RAM
- service tag (Dell servers use this number)
- versions of certain installed applications
- etc...

My question is:
is there a way to gather this information using PHP without having to install any type of reporting agent on each server? SNMP contains a lot of this information, right? Could SNMP and PHP somehow work together? I welcome all of your ideas.

View Replies !
Retrieve Certain String
I have a php 2 files named 'load.php' and 'inc.php'.

<?
$str = "*begin* this is a string *end*";
...
?>

I include inc.php into load.php.

In inc.php, how to open load.php, find string *begin* and start retrieve strings after that until *end*. So, load.php will display just "this is string".

View Replies !
Retrieve Pixels
I have a photo/image and I want to know what color is attributed to a certain pixel. Is it possible to do that with PHP. I found this in the PHP manual:

<?php
$im = ImageCreateFromPng("rockym.png");
$rgb = ImageColorAt($im, 100, 100);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
?>

View Replies !
Retrieve Image
I was wondering if someone could explain a bit how to extract the width and height information from an image and store the values inside variables.

View Replies !
Retrieve Password
I would like to know how I can retrieve a password from a mysql database when a user forgets their password. After I retrieve it, then decrypt it and send it to the user via email.

View Replies !
Use Php To Retrieve Data
I have a table containing 3 columns 1.Slno(primary key) 2. Authors 3Books. Now in my website one page displays the alphabet listing, one each for authors and books. If I click one letter in the authors, I should get list of authors whose name starts with that letter. If I click the letter in the alphabet listing of Books, I should get list of books starting with that letter.

View Replies !
Retrieve From Table
I would like to do it with code and retrieve e-mail which is in table users. PHP Code:

<SELECT NAME="email">
                <?php
                    $users = mysql_table("SELECT * FROM users ORDER BY fname", $db);
                    foreach(...)
                                               {                        
                        }                    
                ?>

View Replies !
Retrieve Headers
I have a small project im working on, and was wondering how i could retrieve the headers sent from a remote server. If i was to do this locally i could get the information i need with $_SERVER["SERVER_SOFTWARE"]; but I would like to be able to retrieve the same information from a remote server.

View Replies !
Retrieve From A Query
I have this query:

if (!$limit) {
$limit = 5;
}
$query = $DB->query( "SELECT n.id, n.idcategoria, n.idautore, n.titolo, n.autore, n.testo, n.data, n.totalcomm, s.id AS idcat, s.titolo AS titcat, s.icona
FROM mkp_news AS n
LEFT JOIN mkp_news_sections AS s ON(s.id = n.idcategoria)
WHERE validate = &#391;' ORDER BY `id` DESC LIMIT $limit");

....and this retrieve last news by id. What I need is to retrieve not the last news but penultimate (ex. if are 30 news, I want to get the 29 -th) or the 5 -th penultimate but not the last (ex. 30).

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved