Jump to content

is there a way to speed up the get url?


dflow

Recommended Posts

Can we see more of your code?  There is a multitude of reasons that could cause this.

here is the code

 

before this

i create the html file no bigger than 65 k,

it is a preview and then it should be saved for future sending etc.

<?php
//url vars:
$urlRID = $_GET['RequestID'];
$urlSupID = $_GET['SupID'];
$urlPID = $_GET['PID'];

$urlpar = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

// submit query to search engine
$url_contents ="http://mysite:xxxx@$urlpar ";
$query_file_content = file_get_contents($url_contents, "r") or die("cannot open url");

// save results to a local file
//  folder 777 permission

$filenameSV = 'COMMITMENT_FORM_';
$filenameLN = $_GET['LN'];
$filenameRID = $_GET['RequestID'];
$filetype = '.htm';


$file = fopen('../backoffice/createdfiles/'.$filenameSV.''.$filenameLN.''.$filenameRID.''.$filetype.'', 'w+');

fwrite ($file, $query_file_content);

fclose($file);


?>

<?php

ini_set ("display_errors", "1");
error_reporting(E_ALL);

//url vars:
$urlRID = $_GET['RequestID'];
$urlSupID = $_GET['SupID'];
$urlPID = $_GET['PID'];

$urlpar = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

// submit query to search engine
$url_contents ="http://mysite:xxxx@" . $urlpar;
$query_file_content = file_get_contents($url_contents) or die("cannot open url");

// save results to a local file
//  folder 777 permission

$filenameSV = 'COMMITMENT_FORM_';
$filenameLN = $_GET['LN'];
$filenameRID = $_GET['RequestID'];
$filetype = '.htm';


$file = fopen("../backoffice/createdfiles/" . $filenameSV . $filenameLN . $filenameRID . $filetype, 'w+');

fwrite ($file, $query_file_content);

fclose($file);


?>

 

Try that?

 

http://php.net/file_get_contents

Server error!

 

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

 

If you think this is a server error, please contact the webmaster.

Error 500

mysite.com

Mon Jun 15 17:01:29 2009

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7e mod_auth_pgsql/2.0.3

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.