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.





Create A New .html File On My Server...


i have some data in a variable ($message) that is being emailed with
the php's mail() function (an html email actually)...i'd like to also
take that html data in the $message variable and have my script also
make a new .html (with any random name) file on my server with that
$message data, any easy way to do that?




View Complete Forum Thread with Replies

Related Forum Messages:
Create A New Html File
how to open and edit or add a file but ,I don't know how to create a new ".html" or ".txt" file? I have STFW and STFM but still maybe i'm blind.

View Replies !
Script To Create Html File
I'm looking for a php script that will look in my images folder and for each image in there, create an html file named <imagename>.html and store it in a folder called "pages". I currently use the code  inserted below that scans my image folder, creates an xml file that contains a list of the images and the my Flash image gallery reads the xml file to create the gallery.

but I would rather do it by the method I'm requesting above and get away from flash. Any ideas? Even if there's a way to modify the code below to do what I want, that would be great. Code:

View Replies !
Create/write A File On A Remote Server
i call a php script which is sat on a php server from mydomain (its the way the isp is set up). i can call the script, send it a file name and data and it will create/write the file without any problems. that means it writes the file in a directory on the php server. i can specify a directory using a pathname and its all fine. i really want to write back to the mydomain and not the php server. the code i have does not work. Code:

<?php
$file = fopen ("ftp://ftp.mydomain.com/testfile.xml", "w");
if (!$file) {
echo "<p>Unable to open remote file for writing.
";
exit;
}
/* Write the data here. */
fwrite ($file, $_SERVER['HTTP_USER_AGENT'] . "
");
fclose ($file);
?>
..............

View Replies !
Create HTML File From Mysql Result
I want to create HTML file from Mysql result one row to one HTML file ( below only display ), Code:

View Replies !
PHP5, Win2003, Create Any File Or Folder On The Server
If I create any file or folder on the server and run the php file it
works with no problem. As soon as I copy a website from another
server onto this one none of the php code works and the browser only
shows the actual php code.
Is there a permission I need to set? I have never had this problem...

View Replies !
Server Recognize Html File AS Php
i want the server to recognize php files as html files...meaning i could have file.html loaded up with php goodness...i believe this can be done with some kind of server/php adjustment?

if anybody knows how, thanks very much...v

ps: as a follow up...does anybody know if it possible to have a file like file1234.html acting as if it was really file.php?id=1234 (assuming the above can be done). a client insists on something like this and i don't even know if this is possible...

View Replies !
Saving A Dynamic Php-file As Static Html (on The Server)...
- I have a problem trying to save a dynamic php/mySQL online order form as static html on the server - I'm not really sure this is possible at all - but my problem is that the order-form consists of a lot of items (100+) + the customer data - and we simply don'y have the kind of database capacity to store each order in a database.
As stated earlier I don't know if this is possible? - the static files should also be named after variables so that it would be possible to search a directory on the server for specific orders (that is $blah_$blaah.html) - but that's not a problem - I know how to do that.

View Replies !
Server To Server File Transefer Script, Getting Wrong File Size
Any help on this is most appreciated. I have created a function to download a file. It seems to work except the file sizes differ greatly. I start off downloading a 5mb .zip file and end up with a 2mb .zip file on the initiating host. Thanks for any advice on this.

function get_http_file ($host_url, $http_file)
{
global $host_url, $http_file;

$fp = fopen("$host_url/$http_file","rb");

while(!feof($fp))
{
$my_file .= fgets($fp, 4096);
}

$fptmp = fopen("/tmp/$http_file","wb");
fputs($fptmp,$my_file);

fclose($fp);
fclose($fptmp);

if (file_exists("/tmp/$http_file"))
{
$result_code = 1;
}
else
{
$result_code = 0;
}

return $result_code;

View Replies !
How To Create Mail Server
i am using php4 & mysql 3.22 with apache and linux. i can able to read the mails using the IMAP functions that is not prob. my question:how will i create a new mail account for my users.

View Replies !
Create A Server Using Sockets
I have created a server using sockets similar to: http://us.php.net/manual/en/ref.sockets.php. I run the script from the command line using php -q /path to php file. The problem is using mysql queries within the do events. On my script I replaced echo "$buf " with my mysql information and a query string. Code:

View Replies !
Create Table Using Php In My Sql Server.
Can anyone guide me to create table using php in my sql server.

View Replies !
Create HTML Page
I would like to make a form that once you insert data into the form,it ll automatically create a html format of the data you entered in a html and save it in a folder! How do i go by doing this?

View Replies !
Create An Html Link
Is it possible to create an html link for in internal *.html file where $filename.html is posted from a form?

View Replies !
Create Html Table
tryin to get a table to add a new td /td for every result from the Db. but can't for life of me figure it out...

the nubers are the results and there are 3 required infos from each entry,(abc)
so if there were 4 results it would have a 4a,4b,4c...

its prob really simple but i cant get it! how would i print it via PHP? Code:

View Replies !
Create HTML Emails
I've been trying to create HTML emails but when i receive the email created by this script the link comes out as text do anyone have any idea why this might be? and what apoach would be best to solve it. Code:

View Replies !
Create New User In Sendmail Server
like a hotmail, after regisration, it would be able to use the email services. now i have a php web email, but i cannot create the user from the sendmail server.....can somebody teach me.

View Replies !
Create Session After Authentication On Other Server
I've posted my problem in an earlier thread and didn't get any luck. In this post I'm trying to make my question more clear:

- I've wrote a php script that composes http get header, this script gets a file and does basic authentication (see below)

- The server that recieves the request (this case: www.example.com) succesfully authenticates gives the script the page requested.

What I would like to happen:

- The page requested should initiate a session between the server and the client. Setting session_start(); in the page requested doesn't do the trick

Code:

View Replies !
How To Create Html List From Such Array ?
I've got an example array like this:

$myArr = array(
array("jj", "0", "jjj"),
array("ee", "0", "eee"),
array("bb", "ee", "bbb"),
array("ll", "ee", "lll"),
array("ff", "0", "fff"),
)

Where each row is an array with columns: id of list element, id of parent
list element ("0" means main node) and content of the element. So, from my
array I'd like to create a list like this:

<ul>
<li>jjj</li>
<li>eee
<ul>
<li>bbb</li>
<li>eee</li>
</ul>
</li>
<li>fff</li>
<ul>

View Replies !
Create Html Table With Php Result?
I'm looking to display 5 records in one rows, from the database. What i mean is, basically, let's take the "emails" as an example. I have a table with 100s of email
addresses. Now i want to display these email addresses on a html table, but i want to display only 5 email adresses per table row, then the next 5 in the next table row and so
on.

View Replies !
PHP Create HTML Email Inserts '!'s
I'm trying to create an email and when it sends the email, it mostly
works except that there are '!' inserted at some spots. Checking the
html source of the email, looks like they are placed at the end of
long lines. I'm assuming there is some issue with the encoding, but
searching through groups, nothing I've tried has worked. Can someone
let me know if I should be doing something differently with my headers
for an html email? I'll change emails to null@null.com. Thanks!

$headers = "X-Mailer: PHP " . phpversion() . "
";
$headers .= "From: null@null.com
";
$headers .= "Reply-To: null@null.com
";
$headers .= "Content-Type: text/html;
";
$headers .= "charset="iso-8859-1"
";
$headers .= "Content-Transfer-Encoding: 7bit
";

View Replies !
Create Form Linked To Html
I need to access an SQL database from a webpage so users can update information directly to the database (in the form of a "form"). There are a few fields from different tables in SQL that I need on the form. I have no idea how to even begin. Someone mentioned that PHP is the way to go and I've started looking through tutorials, but thought I would post the question to see if this is even the right language to use.

View Replies !
Combining BBcode To Create One Html Tag
I'm working on some BBCode and I was wondering if it is possible to combine two bbcode tags to create one span tag after the preg_replace e.g. Code:

[font=Arial ][b ][color=red ]Text[/color ][ /b][/font ]

HTML Code:

<span style='font-family:Arial;font-weight:bold;color:red;'>Text</span>

instead of HTML Code:

<span style='font-family:Arial;'><span style='font-weight:bold;'><span style='color:red;'>Text</span></span></span>

Of course I'd need it for multiple instances of nested BBcode tags within the same message.

View Replies !
Test Server To Live Server - Best Way Of Handling Different File Paths In Scripts?
I have taken over someone else's PHP code and am quite new to PHP. I made
some changes and have implemented them to a live environment fine so far.

However, I now want to setup a test environment. All the PHP scripts start
with a few lines of:

require_once "library file at specific location on server"

and when I move them from the test location to live location I have to
manually apply the changes to each script to reflect the different paths for
each server.

I was thinking of writing a small script that is contained within the same
folder as any folder that contains scripts that actually calls another
require for that server .

E.g.
Have script do_something.php which I am developing regularly.
On live server it starts with
require_once "/home/live/phplib/library.php";
On test server
require_once "/home/test/phplib/library.php";

Currently I apply a manual change this (via global change or whatever) when
moving from Test to Live
However, I might just change all requires to:
require_once "./require.php";

And then have a server specific version of require.php that contains the
necessary requires for the particular server on which it resides.

This way I can just change all the scripts to just require the require.php
file in the same folder as itself. The actual PHP scripts where I do most of
my updates need no changes whether on live or test servers.

I just wanted to know if there was a better way of doing it then this. I
know nothing about directives in PHP or if there was a way of determining
the current server name and then calling different require commands
appropriately.

View Replies !
Php Form To Create A Folder On Linux Server
Is there a simplier way rather than via the Networking tutorial example "shh with php"...? Would I still need to create the priv and pub keys? This is a form creating a folder, both on the same server btw.

View Replies !
Create Directory When Files Are Uploaded To The Server
there i was just wondering if anyone could direct me on how to create a directory on the server each time files are uploaded to the server. i know its something to do with mkdir but im just new on all this.

View Replies !
Create Thumbnails Of Pictures That Are In An External Server
I have a website made it in php 4.4 and I used Gd library in order to create thumbnails of pictures that are localy in my host, but now I need to create thumbnails of pictures that are in an external server, Gd library said I can´t do it..

View Replies !
Script That Uploads A File To A Server And Then FTPs It To A Remote Ftp Server.
Basically I've developed a script that uploads a file to a server and then FTPs it to a remote ftp server. It was (as still does) work fine on my local testing server but since moving it across to IIS, when i run the script, now all I get is a blank page for anything but tiny files. I've tried increasing the values in php.ini that are associated with file uploads, yes I still get the blank screen.

View Replies !
Can Php Create Actual Accounts On Windows 2003 Server
how can I use php to create actual accounts on windows 2003 server(for
handling shared file folder)?

View Replies !
Create A Data Entry HTML Form For Given Table
I am working on a simple web site updating utility for a web site. Rather than hard code the data entry forms, I would like to automactically generate them based upon the table a user selects to update or insert into. What is the best way to approach this?

for "insert" should I use the MySQL DESCRIBE table command and build a form element for each field according to its data type? for "update" should I use the DESCRIBE command to build the form as above and SELECT statement to populate each element with data, or should I just use a SELECT statement to retrieve the data and use php to determine the field type and choose an appropriate form element?

View Replies !
Read A Directory Files, And Create Echo HTML?
i have a foo/ directory and a foobar/ directory, and a barfoo/ directory in root/

for each directory in root, i'll put x or y or z amount of images in each directory. then, have the php write 01.html with the correct links to a) main image, b) thumb images and prev/fwd links.

we could have separate php files to handle the drawing of the new sequenced .html files in each directory (probably best to pass variables), because they're slightly different, or one to rule them all (sounds like too much work).

then, the syntax would need to be sorted out (so index.html has a link to foo/foo.php?=foo01) would work correctly and draw up 01.html with the correct images, being that index.html would probably have to have hardcoded variable-passing links. eh?

it's sweet, 'cause updating would be fast. upload and delete image files. done. I mean, I know that you could go the database/XML route, but sigh ........

View Replies !
Create A Simple HTML Form That Has The Standard To:, CC:, BCC:, Comments: Etc
I need to create a simple HTML form that has the standard To:, CC:, BCC:, Comments: etc. - but I need for the form to have a drop down list of "Subjects". Depending on which subject the user selects, it should email a different email address for each one for the contact.

The email addresses should be hidden and only server side. Could someone point me to a sample form which has something like this? I've Googled it all over but can't find any examples.

View Replies !
Implode - Read The Contents Of A File (servers) And Create A New File
I am trying to read the contents of a file (servers) and create a new file off of it with more information line by line. You will see the logic soon. I know how to do this via a script but not php.

The end result is servers2 should have (ssh root@$count 'echo $user|passwd --stdin root' ; done). The variable $count is the list of servers in the (servers) file, so it will have the line above for each server name. Code:

View Replies !
How Do I Create User Name/password Protect Dirs On Apache Server?
On an Apache server, I want to be able to have a user name/password
directory. I know this can be done with .htaccess, but I want to be
able to do this for multiple users. The purpose of this, is that from
the web page, I want clients to be able to have their own user name and
password, which would grant them access to their own web page which
would contain their client files for them to download.

How can this best be accomplished considering I can't be root on the
web server? I was thinking maybe this can be done in PHP?

View Replies !
SMTP Server - Create A Php Script Thazt Send An Mail
i'm trynig to create a php script thazt send an mail does someone know how to set the smtp server

smtpserver=smtp1 and it is remote server not on my machine.
Itried but i've got this[color=blue][color=green]
>>Failed to connect to mailserver at "localhost" port 25, verify your[/color][/color]
"SMTP" >>and "smtp_port" setting in php.ini or use ini_set()

View Replies !
Form Script - Create The Landing Page In Html With Tags
A form that people will enter their info, and when the submit it, they will land on a page that shows the info they submitted for them to double check that it is the correct info before they confirm the submission. I have an idea that I could create the landing page in html with tags like [firstname] and [address], and have the script replace those tags with the matching field data from the form. I just can't figure out HOW to do it.
Sorry if I'm rather incoherent. just spent a long night attempting to figure this out. I'm feeling very, VERY Dense, even with my very limited PHP knowledge.

View Replies !
Create A Script To Check A Server Status Based On IP And Port Number.
I am trying to create a script to check a server status based on IP and Port number.  I know the server is up because I tested it first to make sure, but when I check it in my script it says it is offline.  Not sure what the problem is, or if I am even doing this right

<?php
$gameserver = '64.182.161.102:27033';
if (preg_match ("/^[a-z0-9][a-z0-9-]+[a-z0-9](.[a-z]{2,4})+$/i", $gameserver)) {
    print "$gameserver is currently online.";
} else {
    print "$gameserver is currently offline!";
}
?>

View Replies !
Function In PHP To Create Files Such As A Php File Or Txt File?
I am currently creating a file manager to add/edit/delete files and folders, etc but i was wondering if there is a function in PHP to create files such as a php file or txt file? All i want is a function that will allow you to create a file from the name you give! Is this possible? I have seen a script called Genesis but the problem is that it is Perl! and i dont have a clue about Perl!

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 !
Html Server Load
This is about a concern about my php file structure and it's impact on server load. I do the traditional structure (tought and done by majority of books and websites) where: the root of the directory lies the php files. the php files then 'require' an html file located in a templates folder.

View Replies !
Include An Html File In Another Html File?
Can I include an html file in another html file usign PHP? Something like the way you would inlclude a text file, only have the html elements show up?

View Replies !
HTML Pages Treated As By The Server.
I'd like all my HTML pages treated as PHP by the server. I know it's possible. How do I do that?

View Replies !
Doing A Server To Server File Transfer
I have two server. I am trying to copy all the files from one to the other. The problem is that there is 80gig to be copied - so I would like to send it from server to server without downloading and the uploading it again.

Is there some way I can use ftp or mget or get or wget or something to move the files faster?

View Replies !
FTP Big File Transfer From Server To Server
I am wanting to do a pretty big file transfer from server to server. The size is about 6 MB. What is the best way to do this using PHP? Would the normal PHP FTP functions transfer this? If so, How do a I make a progress bar so that I know how far it is?

View Replies !
Email With File Attachements - How To Upload File To Server From Browser?
I have a PHP script that sends an email with attachment and works great when
provided the path to the file to send.

However this file needs to be on the same server as the script.

I want to develop a webpage where people can send attachments that are
stored on their local PC.

I know I can use the <input type="file" > HTML to generate a file box that
allows the user to navigate to a file on their PC and product a file path,
but how do I then upload this file onto file server to email out with my PHP
email script?

Is there an easy way to do this?

Or can I approach this problem from a completely different angle.

View Replies !
Warning: File(): URL File-access Is Disabled In The Server Configuration
Does any one know how to work around this error on a web site?

Warning: file(): URL file-access is disabled in the server configuration ...

View Replies !
Download File And Delete File From Server With One Button Click
I want the user to be able to download a CSV file and delete the file from the server all with the click of a button.  Currently, in firefox, it will just display the CSV and not delete it. In IE, it will download the CSV and not delete it. Code:

View Replies !
Direct File Upload From User To SFTP Server "through" Web Server
I am writing a PHP application which requires HUGE files to be uploaded to an Akamai server. The obvious way to do this is to just use cURL or the built-in PHP FTP functions to upload the file to a temp directory on the Web server and then upload them to the Akamai host. However, we don't have enough room on our PHP server to have 1gb size files laying around so I want to see if there's a way for the PHP application to "broker" a transaction directly from the user's desktop to the Akamai servers. further, we need this to be secure, so it would have to use SFTP or SCP.

I thought of using cURL to establish an upload stream, and then another process would just look for data in that stream and pass it on to Akamai, but this feels exceedingly "brittle". Pipes and streams are not the most robust things around and often close down unexpectedly--especially during a 1gb transfer of data.

Has anyone ever done this? Any shortcuts, or hints as to what direction I should look?

View Replies !
File Transfer :: Move_uploaded File Not Working On New Server
I've worked with PHP for a few months and have had several problems, but that's the learning process. I developped a site for the company I work for which involves extensive database manipulation and image integration. The file upload script worked fine before, but now it won't work. My hosting company must have changed something, but now when I upload a file, it uploads but I can't move it. It crashes when I run the 'move_uploaded_file' function and runs the error script. PHP Code:

View Replies !
Script For Grabbing An Xml Rss Feed File Into My Server As Xml File Too
How do I copy using a php or cgi script a remote xml rss feed into my server?

I.E the rss feed:

http://www.lanacion.com.ar/herramie...ex.asp?origen=2

Due to restrictions in flash player 7 I need to load a remote xml rss feed.
I am using load.xml( http://www....

but in that way doesn´t work

The only way that works is when the rss xml feed is placed on my server. I could upload manually the xml rss feed but I need a php script to be called from flash and then parsed. What I need is the script to make that remote xml being "local" to my flash movie.

Trying other stuff Ive found on forums about "proxy scripting" but that only works if you are using flash player 6, flash player 7 even don´t allow redirection scripts at all.

View Replies !
File Upload :: 'wrong File Type' On Another Server
doing a simple image (jpeg) upload to a directory. Have a script which works fine on one server but comes up with 'wrong file type' on another server. The server that works has php5 installed, the other is 4.2.2 but I am sure what I have should work on both.

PHP Code: ......

View Replies !
File Upload NOT Using HTML Input Type=file
in an earlier post on the javascript forum i was talking about a small program i'm writing to allow file uploads through the http protocol that look and function similar to a ftp client.

I have made some nice progress on this project and am able to return the FSO collection from the client pc. this allows me to list of directories on the page so users can select multiple files to upload at once or even entire directories. Code:

View Replies !
External PHP/HTML Loader To A Iframe From A Server Side Php Script
I think I would call what i am trying to do is build a External PHP/HTML Loader where I am laoding a iframe on a web page from a server side PHP script - the action for trigering the event on making the iframe come visable i would like to be done in the server side script and because I do not want any user interaction on trigering that action or alert to happen.

Hiding the iframe

The only way to hide an iframe that allows both browsers to access its content is b setting the style property width and height to 0px for example like this:

<iframe name="myIframe" src="blank.html" style="width:0px;height:0px" frameborder="0">
</iframe>

In the example the scr="blank.html" would "blank.php" work also and does the file need to exist on the server of not will it throw a error condition? if so is there a better way to do that? i have also seen src=" " maybe that is a better solution - i just do not know? any comnets on that issue is welcome!

Unstead of load a page that contains a javascript alert. I want to trigger the alert by either one of two metords
first it could be done by passing something from a php server side script - but what can i do to acpompish that - I do not want to use the GET in the address bar due to the fact that i have a some security issues with that techique and feel
quite uncomfertable about the GET

Also there are differnces in the way the two browsers use the java script and the alert so by trigger the alert in the server side PHP avoids all that and i think as a lot cleaner for my use this time.

A thought might be the following - I could also use some type of techique to test the size of the text contained in the file named in the src= in the iframe properties but not clear at this point what i can do here either? Any ideas or sujestions about how that can be done.

I could also use both the server side PHP and the testing of the size of the file would be a shure way of makeing shure the ifrane stay hidden when nothing in the file named in the src= property.

The name property in the iframe which in the above example myframe is that the proper way to reference the iframe or should i also set the id= property and why would i have to please explain?

In the iframe construct or object above i want to have the scroll bar be active if the text being displayed in larger then the arae on the screen os the scroll bars set be default or do i have to explectly set the property handeling the scroll bars to get them to work?

Npw how should i handle the speed of loading a exteranl file in this case a PHP file into the iframe that is the file named in the
src= property.

what is the impact of just referenceing the php file containing the text that is to be loaded into the iframe directly. It is or coould be a lot of text.

Or is it the best policy to load the data in the background to a like hidden DIV or construct or some kind of blob variable or array of some kind something and then dump the text after it is local to the wab page then move it to the iframe? what are you thoughts on that also welcome.

View Replies !

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