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.





Skip Proxy Use


I'm developing a website that will work as intranet.

The user use a proxy for internet access.

Sometimes, the website is slow, I know that the reason is because the web browser has setup a proxy.

So, how can I develop a instruction that my website don´t use the proxy?.




View Complete Forum Thread with Replies

Related Forum Messages:
Skip A $_FILES
Here is the code im using:

<?php
foreach($_FILES['image']['error'] as $k => $error){

//Tjekker for fejl, hvis igen gÃ¥ videre
if($_FILES['image'][$k][$error] == 0){

//Tjekker om billedet er et gyldigt billede. JPEG eller GIF billede.
if($_FILES['image']['error'][$k] == "image/jpeg" || $_FILES['image']['error'][$k] == "image/pjpeg" || $_FILES['image']['error'][$k] == "image/gif"){

if(!empty($_FILES['image']['name'][$k])){
if(empty($_POST['order'])){
echo "Du skal vælge hvilket nr. billedet skal være. 1, 2 eller 3.";
}else.

View Replies !
Skip Errors
Ive got a code that mix up diff engines like mambo and phpbb, i just got some bothering msgs sometimes, even if the job gets done correctly i remeber theres a code to skip mysql errors so they down show on the php script.

View Replies !
Skip First 3 Chars In A Variable..
I have a variable like :

"tn_blahblah.jpg", How do I change it so "tn_blahblah.jpg", is blahblah.jpg.

I want to drop the first 3 chars everytime.

View Replies !
Skip To Line Command?
Hello fellow PHPers. I've made a few posts in the past few days and really appreciate your help. Now i'm at the end of my project - getting a database submission/send email form to validate.

I get all the correct errors if the person doesn't enter certain fields, and the data doesn't submit. If they do enter all the required fields, it submits...

However, the code for when it doesn't submit reads...
if ($errmsg!= "") {
echo $errmsg;
} else {
the rest of the code
the rest of the html syntax

My problem is that if the error page comes up, the rest of the HTML doesn't get rendered because the PHP simply quits. Is there a command in PHP in terms of "Go To Line This in the document", so rather than exiting it would just skip the rest of the PHP but still print all the HTML. I thought of switching!= to == but the way in which that works fails as well. I'm thinking I might have to validate straight on the form rather than the submission page, but let me know what you know!

View Replies !
How To Skip To An Ancor In The Page?
I made a xhtml page with a form (with an anchor name "form") for sending mail at the bottom of the page . When the submit button is pressed it calls a send.php page that generates some code and recalls the form in it.

The problem is this: is there some way to get the send.php page to open where the anchor is? example: pages.php#form

View Replies !
Page Skip To The Bottom?
Is there any php code that makes the page skip to the bottom?

View Replies !
Skip Lines In Txt-file
I have to process large files containing "logical" blocks of strings, each
block varying in number of lines.
....
Block number x
string1
string2
....
string n
Block number y
et cetera.

Blocks are read and processed one by one. My GetNextBlock ($index) function
returns an array with all lines in a block, and returns the line number of
the next block header.

What is the fastest way to skip those first <$index -1> lines the next read
? I cannot guarantee (unfortunately) the file is still open, so the file
pointer must be assumed at start of file again.

I had an intermittent solution in which I first split all the blocks into
separate files, but that caused a lot of other unwanted effects beyond the
scope of this posting.

View Replies !
Skip First Result In Array
I have an array that contains both key and value. The first key/value is used to store a heading so it is not needed in the rest of the loop. How can I skip that first key/value and display the rest. Example:

$myarray = array("key1"=>"heading", "key2"=>1, "key3"=>2.......

Without knowing the key/value of the first result, how can I skip it

foreach($myarray as $k =>$v){

//if first key skip

//else continue the loop

}

View Replies !
Skip Rest Of Script
ive written a virtual shop in php for my VA Members but i want it to check their account ballance first and if there ballance is lower than that of the item they are trying to buy then i want the program to end without executing the rest of the program which wold buy the member that item?

View Replies !
Mysql Skip Function
i want to have a function, where i can go something liek:

if mysql has error, {
mysql_status_enable = 0;}

this way, it would cancel all funtions and variables relying on anything to do with the database.

View Replies !
Exec(curl --proxy ....) Or Passthru(curl --proxy....)
I am trying to do some proxy stuff , I am able to retrieve the page but not able to catch the return , what I am doing is

passthru("curl --proxy 195.115.142.120:80 xyz.com");

or

exec("curl --proxy 195.115.142.120:80 xyz.com");

It throws the results (displays the xyz.com) to my page but I want to catch that in a variable like

$variable=passthru("curl --proxy 195.115.142.120:80 xyz.com");
or
$variable=(some php fucntion)("curl --proxy 195.115.142.120:80 xyz.com");

echo $variable ,

should give me the page.

View Replies !
Skip First Line When Parsing An Xml File
I have an xml file which I cant change, the problem is that the
first line looks like this <?xml version="1.0" ?> with the rest of
the xml being fine. However when I try to parse this I am getting a
malformed xml error. THis line was added recently, the parser worked
before. My question is how can I get rid of this first line in the
xml file - which I get from an internet feed using
fopen("http://dsfsf.com/sdf.xml", r);

View Replies !
How To Skip Line Every X MySQL Results ?
Im, making a gallery and I'm done with most of it , but I dont like that when it shows the results it show too many vertical results or too many horizontal results. Is is possible to insert something so every 5 or 6 results it skips a line ? Code:

View Replies !
If Statement - Skip Some Code Once My Query Reaches The Last Image
I have a field with the names of image in it and I am tying skip some code once my query reaches the last image (black_spacer.jpg) and I am not getting it to work. Here is my code to check that field from the query. PHP Code:

if ($right_name['Name'] == 'black_spacer.jpg') {

skip the rest....

What am I doing wrong here?

View Replies !
Create A .txt File Or Skip If .txt File Already Exists
I am currently trying to write a favourites script which will store all the information on a .txt file using the following line of code,

$file = fopen("mytextfile.txt","w");

All works great apart from one tiny problem...

Every time i reload the page it re-creates the .txt file and deletes all the content.

I need the code to create a .txt file if one doesn't exist (and skip the creation if one does) then run the rest of my program.

My guess so far is this...

If 'text file' doesn't exist, create one then run rest of code.
If 'text file' does exist, simply run the rest of the code.

View Replies !
PHP Proxy
I'm creating a php-proxy just by passing the request to the correct server and spitting out the reply from that server, but i ran into a small problem concerning cookies. I cannot create a cookie at the client side under the same name as the server that actually send it. Anyone have any ideas as in how to solve this or any example of an existing php-proxy?

View Replies !
Proxy IP
I am using $REMOTE_ADDR to try to get the client's IP address but I get the proxy's. I heard $HTTP_X_FORWARD_FOR could be used but it doesn't work.

View Replies !
PHP As Web Proxy ?
I need to use a PHP app as a sort of a web proxy
To be more specific:

I have a mailserver with own web server and web interface. What want it to
be able to dynamically change its output pages (but I cannot interface
directly PHP with its web browser)

So, suppose the web mail server runs on

http://www.webserver.com

and I have my site at

http://www.myphpserver.com

What I need is user to connect to
http://www.myphpserver.com/webserver/index.htm, and when my PHP webserver
receive this request, it will request the page from
http://www.webserver.com/index.htm. Then it will make some processing on the
returned HTML page (like changing CSS, adding banners, rewrite form's Action
parameter, etc), and will return this page to client.

When client will post a page (like clicking on a submit button), my php page
will receive it, and pass it to original action URL together with all
POST-ed data

View Replies !
IPA Behind Proxy
Is there a way to retrieve IP address behind a proxy?



View Replies !
Hidden IP, Or Proxy ! Help Me !
how can I hidden my IP when I connect Internet !
Or how can I hidden my IP from request HTTP?

Ex:
<form action="url" method="post">
<input name="name" >
<input type=submit name="submit">
</form>

Now, when I submit this form, it will send infomation to server, and the server will know IP of my computer. So, how can I hidden my IP or it will not real IP?

View Replies !
Proxy And Client Ip
I'm using PHP-5.0.1 , I make a script to catch proxy and client ip, this is my script:

<?php
echo "$_SERVER['HTTP_X_FORWARDED_FOR']
=&nbsp;".$_SERVER['HTTP_X_FORWARDED_FOR']."<br>";
echo "$_SERVER['HTTP_CLIENT_IP']
=&nbsp;".$_SERVER['HTTP_CLIENT_IP']."<br>";
?>

it returns errors :

*Notice*: Undefined index: HTTP_X_FORWARDED_FOR in *D:Program
FilesApache GroupApache2htdocs est-scriptipers.php* on line *8*
$_SERVER['HTTP_X_FORWARDED_FOR'] =

*Notice*: Undefined index: HTTP_CLIENT_IP in *D:Program FilesApache
GroupApache2htdocs est-scriptipers.php* on line *9*
$_SERVER['HTTP_CLIENT_IP'] =

I get that script from php-manual at "predefined variables" section :

View Replies !
Using A Http Proxy
I've been trying to get PHP to access all http data via a proxy server - this is the only way I can get anything from port 80 on my Uni connection. I've checked phpinfo() and the environmental variable http_proxy seems to be set, but fopen("http://...") isn't working... I really need to make this work.

View Replies !
Proxy Authorization
Has anyone done proxy authorization via PHP? I need to automatically authenticate through our squid proxy to go through the intranet and was wondering if this was possible via PHP. I've tried a small test by sending the Proxy-Authorization header with a base64 encoded user/pass according to the RFC, but I can't get it to work. PHP Code:

View Replies !
Real Ip Behind A Proxy
is there any way to know the real ip, for people behind a proxy?

View Replies !
PHP & Proxy Server
my development box is behind a proxy server. I have searched hi and lo for some help getting around it to use fopen(). Anyone have any suggestions?

View Replies !
Sessions/proxy
has anybody had problems using sessions when connecting thru a web proxy, it seems when i test sessions thru proxy my session id is retained but not the variables registered with the session. any ideas?

View Replies !
Proxy Servers
I am tracking remote users ($_SERVER['REMOTE_HOST'] or $_SERVER['REMOTE_ADDR']). Not a problem. The problem that I am running into is proxy servers. I am getting a single user registaring from multipule IP address, like this:

cache7-5.ruh.isu.net.sa
cache1-2.ruh.isu.net.sa
cache9-5.ruh.isu.net.sa
cache10-5.ruh.isu.net.sa
cache2-2.ruh.isu.net.sa

I wouldn't normally have a problem with this, but I need to be acurate in my tracking... these are all posting to my database as unique hits to the web site when they are really session hits (or hits orginating from the unique hit).

The problem looks to be that the web sites files are cached on the proxy server and thus pings my database from the cashed location instead of the server that the website is located on. The application that I am building is a thrid party add on to a site. I can not force a web site to not allow cashed pages to be stored. Can anyone think of a way around this bug?

View Replies !
Zend_http_client & Proxy
Anyone know how to use the proxy in the zend_http_client? I need HTTPS
sessions to go through a proxy on GoDaddy hosting

View Replies !
PHP Server Behind A Proxy
I'm trying to run a script that calls out to yahoo stocks to grab quotes. The problem is the PHP on the server can't seem to grab the quotes because I'm behind a proxy. How would I get around this?

View Replies !
The Proxy Pattern In PHP 5
This week I've I continued my series of design patterns examples using
PHP 5 with the Bridge Pattern and the Flyweight Pattern.

Here now is my 19th design pattern example using PHP 5, the Proxy
Pattern.

http://www.fluffycat.com/PHP-Design-Patterns/Proxy/

In the proxy pattern one class stands in for and controll all calls to
another class.

This could be because the real subject class is on another platform,
the real subject is "expensive" to create so we only create it if
necessary, or to controll access to the real subject class.

A proxy can also add access functionality, such as keeping track of
how many times a real subject is called.

Proxy is a nice little pattern, being both fairly simple and widely
used.

View Replies !
How To Detect Proxy?
What's a good way to detect if an ip is a proxy ?

View Replies !
PHP CURL Proxy
Is there any way I can use curl through a proxy without specifying my username and password in the actual script? Code:

View Replies !
Block Proxy Use...
I was just wondering if there is anyway of checking if a user is using a Proxy or not.

View Replies !
Detect Proxy Typ
Is there any way to detect the type of proxy Transparent, Anonymouse, High Anonimity or No Proxy.

View Replies !
PHP Via A Proxy Server
I am running Apache/PHP on my local machine and connecting through the Internet via my company's proxy server. One of the applications I developing uses the Impload function to read an HTML page. When I run the script on my local machine, the implode function doesn't work, but when it is uploaded to the Internet server, it works.

How can I specify to PHP that it has to route all traffic via a proxy server before calling the implode function? Is there a PHP function I can call or any setting I have to do on my local server to get this done?

View Replies !
Proxy With PHP & SOAP
I'm trying to use PHP to proxy a SOAP envelope. I tried various things like:

1) http://www.practicalwebmaster.com/entries/using-php-to-proxy-remote-url-ajax-requests.html

2) http://www.troywolf.com/articles/

They sort of work, but neither is able to send a SOAP envelope.

Here is a snippet of the code I would use:


    xmlDoc = // get an XMLHttpRequest object appropriate for browser type
    if(xmlDoc.overrideMimeType) xmlDoc.overrideMimeType('text/xml');

    url = 'http://services.xmethods.net/soap'; // url to proxy
    url = 'proxy.php?proxy_url=' + escape(url);  // assume proxy is in current directory
    xmlDoc.open('POST', url, true);
    xmlDoc.setRequestHeader('Content-Type', 'text/xml');
    xmlDoc.setRequestHeader('SOAPAction', '""');
    xmlDoc.onreadystatechange = getResults;
    req.send(
    // Soap Envelope
   );

Anyone have any ideas?

View Replies !
Connect To Proxy
I have a page that makes my host send a request to a site, but how would i get my host's server to connect to a proxy that will send the request?

edit: wow just my luck, i have been searching google for days and 10 minutes after i ask somebody, i find what im looking for, in the file_get_contents function page of all place's.

View Replies !
Connecting Through A Proxy
What I am trying to do is connect to my newshost (unlimited.newshosting.com(63.218.45.254 port is 119)) to download usenet headers for my site.After sending a whitelist request to Godaddy, they replied with this:

Thank you for your email. Applications that need to make https connections (port 443) will need to be made "proxy aware". This will require additional coding to varying degrees, depending on the application. You will need to know the ip address and port of the proxy server in order to correctly modify your code. The ip of the proxy server is 64.202.165.130 and connections will be made on port 3128.

You will need to use this when coding with PHP:

curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, http://64.202.165.130:3128);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

I'm not sure how I go about this.

The code: ......

View Replies !
HTTP_X_FORWARDED_FOR To Ban Proxy?
I've been trying to figure out how to ban proxys from accessing certain parts of my site.. here's my code:

<?php
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
echo "yes";
}else{
echo "no";
}
?>

As expected when I access the page it outputs no, but I just did a google search for proxy servers to test with and I when I used it, it still outputted no. Surely it should've been yes if I'm using a proxy...

View Replies !
Proxy Chaining
Is it possible to request a file from behind a chain of proxies? I haven't been able to find any tutorials on this subject.

View Replies !
Curl Proxy
I am trying to use cURL with a proxy but it keeps returning a wierd number and wondering if anyone knows why?

<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL,"http://www.whatismyip.com/");
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);
curl_setopt($ch, CURLOPT_PROXY, &#3970;.85.170.96:8100');
$page = curl_exec($ch);
echo $page;
curl_close($ch);

it returns things like:

8fd4adfd
305d1ec=
38bf3d3c

something new every page view.

View Replies !
CURL Proxy?
Does anyone know how to use cURL to access a site through a proxy server?

View Replies !
Proxy Authentication
Am working behind a proxy, this is causing problems when I try to save an image from another server.

Dose anyone know how to authenticate and run this code?

<?php
$url = "http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&styles=&srs=EPSG:4326&bbox=110,-45.5,160,-8&WIDTH=1280&HEIGHT=960&format=image/jpeg ";
$file = file_get_contents($url);
$path = "./map/test.jpg";
if(file_put_contents($path,$file)){
 //run map script
}
else{
//log error
}
?>

View Replies !
Creating A Proxy?
1. I am trying to create a CGI/PHP proxy that accepts a URL (ex. http://www.foo.com?bork=1&bar=2), parses this URL, and then sends various information to a seperate HTTP form. Easy right? This is where it gets fun!!!

2. The form I want to send the URL TO will respond by sending BACK a different URL as a redirect. I need the CGI/Proxy to get/grab/acquire that new URL from the redirect (http://www.server.com?id=123&name=666&pwd=foobar) so I can further manipulate/process it and pass yet another new URL back to the user (http://www.howdy.com/videoclip.htm). Alas, the whole idea of the PROXY - to take an input from User A, process it, send out something, get something back, process it, and pass it back to User A. The idea here is to create one more layer of obscurity by creating a proxy between a user and the actual HTML form that handles taking a nonsecure URL, processing, and reissuing a secure URL's. My hope was to use the proxy to take the NASTY looking secure URL and reform it so I can send a cleaner more user friendly version back to the user in the end.

I am really lost on how to deal with the information coming BACK from the server that creates the secure URL. I don't have any problem processing what is sent to the CGI initially because the CGI is specifically called and sent information to process. The issue here is responding to what comes back since the CGI isn't really 'called' as much as just waiting to receive the URL back from the server processing the form.

Does this make sense? Can I explain this any better/differently that might shed more light on my issue? I believe this is something PHP can do but, then again, I am not totally sure. Anyone have thoughts, pointers or suggestions?

View Replies !
Proxy From Txt File?
I'm working on a test script here, this is what i've gotten thus far:

$proxies = array("proxy1.net", "proxy2.com", "proxy3.org");
$h = fopen($proxies[rand(0, count($proxies)], 80);
fwrite($h, "OPEN recordedhits.php");
fclose($h);

Pretty much want I want to-do here, is make a txt document full of proxy servers & or ip's then when this script is called it should go threw them one at a time and hit my recordedhits.php script which should record it all. I've got the recordedhits.php one finished now I just need a little help on this one. I'm not quite sure how to pull the proxy's from an array, and well im not even sure if this will work and im pretty sure this just randomlly picks a proxy and dosn't actually go threw them all 1 at a time...

View Replies !
Get CURL To Use A Proxy
I was wondering how i could get cURL to run things through a proxy.

View Replies !
File_get_contents Via Proxy
I do some development @ the office from time to time and ive run into an issue where i cant use file_get_contents b/c it returns a unauthorized error... at work we pipe IE/Firefox through the corporate proxy script

how can I tell php it needs todo the same?

View Replies !
Web Services Behind Proxy
I was trying out nusoap by using it with google search web services. After a few unsuccessful tries I figured out the problem was not with my code but with my connectivity. I am behind an proxy and my scripts don't work 'cos of that. I tried disconnecting from the network and connected to another network and my scripts worked fine. Is there any way we can specify the proxy address when connecting to web services?

View Replies !
Proxy Web Server
As you can see thats my proxy web server i am making, BUT When someone types a site, the site shows fine but when he or she clicks a link, the proxy ends and it goes to another webpage.

View Replies !
$_SERVER['host'] Looks Up Proxy.
I have a small piece of script to determine once IP.
It also works if your behind proxy.

View Replies !
Getting The IP Of Users Behind Proxy Server
Is it possible to retreive the ip address of users who are sitting behind a proxy server?

I am making a php poll, and to avoid double posts, I want to check the ip, but in Belgium all cable users must go thru a proxy server, so that means only one cable user can vote, and I don't want that!

View Replies !
Cookies At Proxy Level
I am working on a project which requires me to store cookies or
sessions at proxy level (i.e squid).

In detail I am using squid redirector script.This redirector script is
in PHP.Now I need to check whether the cookie is set or not & on that
basis I am taking some decisions.But I don't know if cookie or session
can be used at proxy level or not as these are server variables.

View Replies !

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