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.





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 Complete Forum Thread with Replies

Related Forum Messages:
Restricting Page Access
I'm developing a web application using PHP and SQL 2000 database. What I need is to restrict web page access depending on the roles assigned to the user in the database. How do I go about it?

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 !
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 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 !
Restricting Certain Browsers
I was wondering if there was a way to restrict certain browsers from viewing a webpage. If so does anyone know where to find some snippets of code for doing so, or can anyone help me do so for my page?

View Replies !
Restricting Results
This is my snippet of code without my added attemtps. I have tried various ways but to no avail. I am trying to only display 2 results based on date, but cant seem to make it display only 2.


$sql = 'SELECT * FROM brokerage ORDER by date'
$result = mysql_query($sql, $conn);
$num_rows = mysql_num_rows($result);
while ($row = mysql_fetch_array($result))
{
print "<br /><b>".stripslashes($row['model'])."</b>";
}

View Replies !
Restricting PHP Execution
I am running Apache 1.3.33 and PHP 4.3.11. Is there a way, either via httpd.conf or php.ini, to restrict which directories can be used for the execution of PHP scripts similar to how you can restrict cgi scripts to be allowed to run only if they are in a cgi-bin directory.

View Replies !
Restricting Entries
I have a simple HTML form that feeds into a PHP script. Very simply, I only want to allow people to enter positive integers. No symbols, letters, negative numbers, etc.

View Replies !
Restricting Word
I have looked through umpteen articles on google and can not find what i am looking for. In the right direction for restricting the results. for example if a news article is submitted i want to show a brief description like the first 20 words and then offer a link to the whole article.

View Replies !
Restricting Number
I am using the following function to read a .db file, and echo out its contents. This is working fine - however, the file is becoming really large and we only want to output the *top* 30 lines of the file (as it's added into the file as new->old). PHP Code:

<?php $mail = file_get_contents("/path/to/mail.db"); echo nl2br(strip_tags($mail)) ?>

Is there a way we can just show the top 30 lines.

View Replies !
Restricting Letters
else if($password != $cpassword){ $errors[] = 'Password fields did not match.'; }    else if($addressLength == 0)  { $errors[] = 'Address field not filled out.'; }

i have a registration form, and i want to make it so that if telephone # != a number, then the registration wont go through, but using the format above, where the errors are posted on the next page load.

View Replies !
Restricting Usage
I am creating a script that allows users to create an email account at mydomain. (Cpanel)

I would like to restrict usage of the script to prevent misuse. How could I do error checking to ensure that the script is only used once within a 5 minute timeframe? Or am I going about this the wrong way?

View Replies !
Restricting Script To Run With Crontab Only
I'm creating a re-billing script to process subscription renewals for
a site. I want to use crontab to check once a day for expiring
accounts and re-bill the credit card. This script will only be run
via crontab. Is there a technique that I can apply to prevent access
to the script via HTTP and only execute it via crontab. One thought
was to put the script outside of the public root.

View Replies !
Restricting File Access
i have a user based login area, that i want to put some files into a folder that only registered members can have access to the files, so that they can download them. Is this possible with PHP, and could someone give me some pointers, how?

View Replies !
Restricting File Types
I am attempting to use some code I found in an article on this site to upload an image to the server. I have got this working although I need to be able to restrict the image formats to GIF, JPG and PNG. I have got it working where it will upload a GIF but not a PNG or JPG. Anyone know how I fix this? Code:

View Replies !
Restricting Certain HTML Tags
I want to restrict users to only using certain html tags, such as a, b, i, and u, and for certain special purposes only embed.

View Replies !
Restricting An Entire Domain To Yourself?
how to temporarily restrict "mysite.com" and any subs ("mysite.com/anything") for personal access? I'm optimizing my DB and it may take up to a few days for transfer and testing. The gist of the environment is CPANEL-X, PHPMYADMIN, and a 1973 Farmer's Almanac.

Ideally would be for the public to receive a generic "Updating the site" message while my IP (or login?) had "business as usual" access. Is that possible? How do you keep out the masses?

View Replies !
Restricting Access To Popups
I have a site that uses sessions for logon state and want to restrict image
popups. Can I pass the session ID, if it exists to generate the popup?

View Replies !
Restricting Access By Record??
I'm creating a MySQL database for a record company and they want to restrict access to certain records. I know that I can restrict access to databases, table, and certain columns, but I've scoured the web and have been unable to find how I can limit access to particular records. Code:

View Replies !
Restricting A Submit Button
I was wondering if anyone new of a way to restrict a submit button on an html form with php. Specifically, I only want the button to be clicked with the mouse for submission rather than with the mouse or by hitting enter.

I am having clients accidentally hit enter half way through filling out a form and sending incomplete information.

View Replies !
Restricting Certain Characters From Input
I was wondering how I would be able to keep users from putting certain characters such as <,>,,/?, etc in text inputs in forms?

View Replies !
Blocking/Restricting Hyperlinks
I basically need block ALL visitors coming from certain locations, as the website I work for's population is mainly kids and young teens. So yeah, you see my problem. I would really like to keep them all as safe as possible. One of the main things I'd like to do is block access to it from the 4chan websites, as well as a couple of others.

If you know of 4chan, you know why, if not, then assume 4chan is no good. So anyway. All I really know on this subject is $_SERVER['HTTP_REFERER'], which returns the referral URL, if there is one. BUT, is there a way to block from all locations on a single website? And if so, how?

View Replies !
Restricting File Download
Does anyone know how to restrict file download to a particular group? E.g. I've got a file in download/file.doc, but now i only want to allow certain users to download that file. Currently everyone can just type in the url mydomain.com/download/file.doc and can get the file.

Protecting the file (or folder that it is in) with .htaccess is not ideal, since then my goup of users that do have download permissions would need that username and password. I want to do it a bit more elegantly and seamlessly.

View Replies !
Restricting Image Size
I need to restrict the size of an image file (as in its width and height, not file size) that a user uploads.

View Replies !
Restricting Access To A File
I'm trying to find a good way to restrict access to a temporary directory that holds a PDF report. The PDF is generated by a script and then redirected to. I found this is the only way to do it b/c I needed the filename to be correct, and some sort of IE bug caused the PDF to be named the same as the script when saved; So, the script creates a temp directory (something like /tmp-pdf098098098098/) and then drops the PDF into it.

View Replies !
Character Limit Restricting
I am building a block for my CMS that will list the top 10 weblinks and downloads. it displays its rank, title, and the # of times it has been visited/downloaded now here is the issue. Sometimes there are going to be titles of links/ downloads that can not be completly displayed or they will strech the page, I am trying to figur out how I can count the characters in each title, and cut it off at a point and replace the remainder with lets say "...";

View Replies !
Restricting Google API Search To A Domain
How can you restrict the Google API search to just one domain??

View Replies !
Restricting Access And Protecting Code
I have written an application in PHP that will be used by telecoms and
ISP's. It will be installed on a server that will only be running this
app. Will most probably be using the latest SuSE linux version.
I need to provide them with root access to the server so that
they may perform simple issues such as IP address changes and backups.

I do not want them to have access to my code nor the postgres db.
It is vital that this is protected.
There are some php encoders available such as Zend Encoder.
Do these encoders do the job well?

View Replies !
Restricting User Login Attempts
I'm developing a database driven website on Unix using PHP and MYSQL. Users are required to register and are then allocated a username and password. In order to purchase items from the site, users are required to login using username and password.

I want each user to be able to attempt login no more than 3 times - on the third attempt, if the username is wrong, the account is locked out.

Any ideas on the best way to do this - i.e. keep track of the number of attempts? I thought of adding a LOGIN_ATTEMPT_NO to the USER table and incrementing it each time a login is attempted. But no sure is this is the best way.

Was also thinking about using php session vars but presume these get reset at end of session, so if user restarts computer or exits and reenters site, vars will be reset. I want them to remain locked out until they contact system admin to reset the account.

View Replies !
Restricting File Size Upload
This is the script i have that uploads files to a folder, all works ok with the uploading side. What i want to do is check and restrict the file size being uploaded if its bigger than allowed. Can anyone point me in the right direction. Code:

View Replies !
Restricting Access To A Records Contents
I have a table called Reports . These are reports of different users . Now if 2 users attend a meeting, they each make separate reports which get stored. When a third user attends another meeting on the same subject, he creates a third record.

I have been fiddling around with ways of updating records such that a single report can be updated by all 3 users. But it results in even a 4th user being able to view the report (if not update) and i just dont know how i can limit this.  The issue here is that a situation can arise when the 4th user may need to read the report but until the time he needs to, i dont wish to allow access to that report. Code:

View Replies !
Restricting Acces To Admin Area
I have created a little website with login and admin area that updates the sites content. I need to figur eout what the best way is to stop people who are not logged in going direct to my admin pages for example just typing in /admin.php when nobody is logged in.

I read this can be done using cookie although I am not sure how and I have created a session so was wondering if it could be done via that? A little unsure here!

View Replies !
Restricting Lines To 1000 Characters Max?
How can I make sure that user defined HTML that is received single line gets split up into lines of maximum 1000 characters? The HTML will become a newsletter and will be send out. Some mailboxes truncate lines that are longer than 1000 character due to SMTP specifications (more info here ) So I want no line to be longer than 1000 characters; and no HTML tags neither words must be broken? I thought about PHP wordwrap but this breaks words and tags...

View Replies !
Restricting File Types To Db Seperately
I have a form that uploads images to a directory and other files to database.I can restrict file types going to directory,but am struggling restricing file types going to db. Code:

View Replies !
Restricting Access To Menu Options
I'm building a very simple content management site that tracks
"tasks."

The options available are:
1.Add Task
2.Edit Task
3.View Task
4.Print Task

I need to restrict some users to only View and Print and I'm trying to
find a way to tell the page not to load the menu options (the text)
for those not having access to the Add and Edit functions. Code:

View Replies !
Restricting The Number Of Decimal Places
Is it possible to declare a int so that it only has 2 decimal places?

View Replies !
Restricting Whats Displayed By Amount
I have a events calendar, that alows guest users to add their attendence, but what I want to do is not show the add attendee button once the amount of attendees reaches the amount of spaces on the course.

What would be the best way to do this. The add attendee function is added to the page in an include.

View Replies !
Restricting PHP's File System Access
I am hosting a few virtual sites on my server. I have PHP installed and was wondering about a security risk.
Anyone can create a php script to delete a folder in the main www directory. If I change the permissions on the folder, no one could see the website... Is there any way I can prevent someone from running such a script? Is there something in PHP that can allow me to control what domains can have access to this function?

View Replies !
Restricting Direct Access To Popup Form
I have a popup window (required by the client) containing a form and would like to prevent users from accessing it directly. They are instead required to access the page via a hyperlink on another page.

HTTP_REFERER, while not completely reliable, would serve the purpose except for another problem. The hyperlink points to a JavaScript function which opens the popup.

This yields HTTP_REFERER worthless. My other thought was to create a session_id and pass it to the popup. However this session_id would not be valid in the new popup window.

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 !
Restricting File Read Access To Users But Not Server
I`d like to know if it is possible to place a products.dat file on my website, yet restrict users so that they cannot see or d/l the file, but they can access it through a php file which is run by the web server which has the only access to the products file when browsing.

Does this make sense?, its basically client server, but since my php knowledge isnt great yet, Im not sure if this is easy or not?

View Replies !
Restricting Non Image Files From File Upload Form?
I have a file upload form on my site, but I want it so that the user can only select gif, jpg, etc.  How do I do this?

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 !
Get IP Address
I was wondering if some could tell me how to get the IP address of the
server PC that I am using. I can get the address of the machine that is
being connected to the server, but I would like to be able to get the
server IP address as well.
I used:

<?php
//Gets the IP address
$ip = getenv("REMOTE_ADDR") ;...

View Replies !
How To Get An Ip Address?
Is there a way to get the IP address of someone viewing your page using PHP?

View Replies !
PHP IP Address
I would like to get the users wan ip address, but $_SERVER['REMOTE_ADDR'] just gives me DNS, anyone know why and how to get round this problem

View Replies !

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