Dealing with PHP Files
|
|
Thread rating:  |
Dudley Henriques - 01 Dec 2007 03:13 GMT I have a situation where I write aviation tutorials that appear on web sites. I also have a situation where I'm using an IMac OSX 10.4.10 with Firefox as the browser. I have to copy these tutorials off the web pages and store them on my Mac. From time to time I have to send the stored files out to people who use PC's. Question is this; I've noticed that when I transfered my saved data from the PC to the Mac I ended up with mht files which the Mac won't read without some wheeling and dealing software wise that I'd rather avoid. What I want to do is re-download all these tutorials and save them on the Mac. I tried one and it now gives a php extension that will open here in TextEdit. I get a file and a folder with the download. I'm assuming the folder is the images. Question is, if I send an email and want to attach the php tutorial and the other end has a PC, do I just attach the file and not the image folder and if so will the images be on the other end when the person receiving it opens it. I'm assuming that it will open in their browser or applicable Microsoft program??? Can someone shed some light on this situation? I just want to understand it better before downloading all those tutorials.
 Signature Dudley Henriques
dorayme - 01 Dec 2007 03:52 GMT > I have a situation where I write aviation tutorials that appear on web > sites. I also have a situation where I'm using an IMac OSX 10.4.10 with > Firefox as the browser. I have to copy these tutorials off the web pages > and store them on my Mac. From time to time I have to send the stored > files out to people who use PC's. If you are just wanting to save and refer people to the tutorials, why not just give them the url (the web address)?
If you want a local copy, use the Firefox "Save" function and it will save the webpage or pages, which will then open in any browser, platform independent.
You can also edit the HTML files to get rid of what you don't want and resave. You can then post your files with any associated images to a web server and simply give your friends the url. You get free web space with most ISPs for this.
Give a shout if you need a hand in any editing.
 Signature dorayme
Dudley Henriques - 01 Dec 2007 04:54 GMT >> I have a situation where I write aviation tutorials that appear on web >> sites. I also have a situation where I'm using an IMac OSX 10.4.10 with [quoted text clipped - 15 lines] > > Give a shout if you need a hand in any editing. I think this solves the issue for me but I'm still a bit confused if you'll bear with me. Yes, I want to save copies of the tutorials on the IMac, then be able to send them by email to PC users probably using Internet Explorer or some other Microsoft compatible browser on their end. Checking the sites and the tutorials with Firefox, if I go to a printer friendly format to download, I get the php extension and the save options in different formats. I've been selecting (save all files). This downloads to the Mac with a file showing the entire tutorial with the images and a folder with just the images. I then create a folder for the tutorial and put both the file and the image folder in that folder. So far so good! I've saved the work with a php extension.
Now comes the part where I want to email the page. I want the reciepient to be able to see the entire page with images just as it exists on the web site. I know I could simply send a link but they need a printed copy from me and I don't want to make them download and print out the page (which of course would be a nice solution :-))
So I write my email and go to attach the article.
Do I attach just the file or BOTH the file and the image folder?
Now here's the big question; assuming I attach what needs to be attached here, the file will have that php extension going through to the PC. Will Internet Explorer or their Microsoft compatible browser open that php file for them? If it will, I'm good to go :-))
 Signature Dudley Henriques
tacit - 01 Dec 2007 19:31 GMT > Checking the sites and the tutorials with Firefox, if I go to a printer > friendly format to download, I get the php extension and the save > options in different formats. Yep. You're mking a mistake by trying to use a Web browser to download the files.
Go to www.versiontracker.com or some other place where you can download computer programs for your Mac. Look for Web downloader Software. A Web downloader is a computer program that is not a Web browser. Instead, it is a computer program intended to do exactly what you want to do. You give it a URL and then it creates on your computer's hard drive a set of files--HTML and all the necessary images--that you need in order to see the Web site on your computer, or send to someone else.
 Signature Photography, kink, polyamory, shareware, and more: all at http://www.xeromag.com/franklin.html
Dudley Henriques - 01 Dec 2007 20:07 GMT >> Checking the sites and the tutorials with Firefox, if I go to a printer >> friendly format to download, I get the php extension and the save [quoted text clipped - 10 lines] > files--HTML and all the necessary images--that you need in order to see > the Web site on your computer, or send to someone else. Thanks for the tip. I'll check this out. D
Tim Streater - 01 Dec 2007 20:54 GMT > >> Checking the sites and the tutorials with Firefox, if I go to a printer > >> friendly format to download, I get the php extension and the save [quoted text clipped - 13 lines] > Thanks for the tip. I'll check this out. > D Errm, I'm jumping in the middle a bit here, so apols in advance.
It may say its a php file, but in fact it isn't. A site I manage has a pdf on it you can download, but when you receive it its called something.php. I've ended up putting a message on the site to warn people to rename the file once they've downloaded it. It may be called that because that's the name of the script that gets called to do the work.
You should rename the file to be what it is, and if its actually an html file, you can fix the line-endings with TextWrangler very trivially should you need to send it to PC from a Mac.
Dudley Henriques - 02 Dec 2007 02:40 GMT >>>> Checking the sites and the tutorials with Firefox, if I go to a printer >>>> friendly format to download, I get the php extension and the save [quoted text clipped - 25 lines] > file, you can fix the line-endings with TextWrangler very trivially > should you need to send it to PC from a Mac. Looking into this. Thanks. DH
 Signature Dudley Henriques
Leonard Blaisdell - 01 Dec 2007 04:02 GMT > Question is, if I send an email and want to attach the php tutorial and > the other end has a PC, do I just attach the file and not the image [quoted text clipped - 3 lines] > Can someone shed some light on this situation? I just want to understand > it better before downloading all those tutorials. I'm sure I don't know the half of it, but if you send text documents, understood by Microsoft programs with the line endings correct[1], the recipient won't be able to view the PHP content without having a server running that has PHP enabled. On Macs, Apache with PHP enabled is the only way you will see the PHP content. I have no idea concerning Windows. An option is for the recipient to upload the files to a server that uses PHP, either Apache or IIS. I'm not sure about IIS.
[1] Macs, UNIX and Windows use different line ending characters which render them all incompatible without conversion by a text program that converts between them. Decent text rendering programs on all platforms do it. You just have to tell them.
leo
Dudley Henriques - 01 Dec 2007 04:37 GMT >> Question is, if I send an email and want to attach the php tutorial and >> the other end has a PC, do I just attach the file and not the image [quoted text clipped - 18 lines] > > leo Thanks. This is a bit above my pay grade but I think I understand that if I send a PHP file attached to an email using the Mac, the person receiving it won't be able to see the article on their PC without going through a real hassle? If I reduce my initial question and rephrase it differently it would read as follows; How can I download a web page to my IMac, save that page (in what format?) on my system, then be able to send it to a PC so it can be seen there as it was on the Mac? I take it this isn't possible without compatible servers and software?????? DH
 Signature Dudley Henriques
Dave Balderstone - 01 Dec 2007 04:42 GMT > Thanks. This is a bit above my pay grade but I think I understand that > if I send a PHP file attached to an email using the Mac, the person > receiving it won't be able to see the article on their PC without going > through a real hassle? PHP is code that has to be interpreted at the server level to be useful.
In general, sending it to someone via email is totally useless.
 Signature Help improve usenet. Kill-file Google Groups. http://improve-usenet.org/
dorayme - 01 Dec 2007 04:54 GMT > How can I download a web page to my IMac, save that page (in what > format?) on my system, then be able to send it to a PC so it can be seen > there as it was on the Mac? I take it this isn't possible without > compatible servers and software?????? Perhaps you did not get my reply to this? You can save any web page in Firefox, Command + S. If a web page has a .php ending this just means that the document that was loaded to the server had php code in it that he wanted parsed. The .php ending lets the server know to parse the php code in it There are other ways too). If you go the source of the webpage via your browser, you will just see a text file with html mark up. If you copy and paste this into a simple plain text editorr like BBEdit or TextWrangler and save it as .html rather than .php, you can then do either of two things:
(1) Send the file to your friends and tell them to drag it over any browser. It will open and they will see it. The php engine on the original server has done its bit and put together the text doc for the browser. There is not a tace of php code in it any more.
(2) You can post the new doc.html to your own server and simply give your friends the url.
I have simplified the above and left out the mentioning pic files (but I don't know if you have any).
 Signature dorayme
Dudley Henriques - 01 Dec 2007 04:59 GMT >> How can I download a web page to my IMac, save that page (in what >> format?) on my system, then be able to send it to a PC so it can be seen [quoted text clipped - 23 lines] > I have simplified the above and left out the mentioning pic files > (but I don't know if you have any). Thanks. I'm going to have to print this out and study it. So the bottom line seems to be that without the above learning curve, there really isn't any easy way to save a web page as it appears on a site to the Mac then send that page to a PC?
 Signature Dudley Henriques
Dave Balderstone - 01 Dec 2007 05:05 GMT > So the bottom line seems to be that without the above learning curve, > there really isn't any easy way to save a web page as it appears on a > site to the Mac then send that page to a PC? So send them the _ing URL.
Or are you trying to send content to people who should be paying for it, but don't want to?
In other words, are you trying to solve a legitimate problem, or steal someone's property?
 Signature Help improve usenet. Kill-file Google Groups. http://improve-usenet.org/
Dudley Henriques - 01 Dec 2007 05:27 GMT >> So the bottom line seems to be that without the above learning curve, >> there really isn't any easy way to save a web page as it appears on a [quoted text clipped - 7 lines] > In other words, are you trying to solve a legitimate problem, or steal > someone's property? http://www.simflight.com/modules.php?name=News&file=article&sid=6181
 Signature Dudley Henriques
Dave Balderstone - 01 Dec 2007 14:03 GMT > http://www.simflight.com/modules.php?name=News&file=article&sid=6181 Okay, so why not just send the URL? Or the text?
The page is being created "on the fly" (sorry) by php code reading info from a database, which is why you're having problems.
 Signature Help improve usenet. Kill-file Google Groups. http://improve-usenet.org/
Dudley Henriques - 01 Dec 2007 15:11 GMT >> http://www.simflight.com/modules.php?name=News&file=article&sid=6181 > > Okay, so why not just send the URL? Or the text? > > The page is being created "on the fly" (sorry) by php code reading info > from a database, which is why you're having problems. I have an explicit reason for not wanting to take the easy road and send a URL to the receiver. If doing that was an option for me I believe I have the native intelligence to have recognized it rather than waste my time and yours attempting to deal with the obvious.
What I needed was a point in the right direction to a save format that is universal to the Mac and a PC.
Thanks to (other than this specific exchange) replies I received on this forum, that question has been resolved quite well.
Thank you for your time.
 Signature Dudley Henriques
Tom Stiller - 01 Dec 2007 15:56 GMT > >> http://www.simflight.com/modules.php?name=News&file=article&sid=6181 > > [quoted text clipped - 15 lines] > > Thank you for your time. What you may have missed in the exchange is that PHP is a /server-side/ language which is interpreted at the server when the page is requested. Depending on what actions it performs, a saved page may, or may not, display the same content when loaded locally.
 Signature Tom Stiller
PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF
Dudley Henriques - 01 Dec 2007 16:24 GMT >>>> http://www.simflight.com/modules.php?name=News&file=article&sid=6181 >>> Okay, so why not just send the URL? Or the text? [quoted text clipped - 19 lines] > Depending on what actions it performs, a saved page may, or may not, > display the same content when loaded locally. I'm running into these file extension issues as the result of transferring data from sites that was saved on a PC using IE on over to the new Mac. So far,because of the programs available to open files on the Mac, the only two issues seem to be the php issue and a lot of proprietorial extensions from saved files off Microsoft friendly sites. I'm re- downloading a lot of stuff on the Mac and getting rid of a lot of these problems. The one issue of being able to deal with the php extension I think is solved now as both pdf and html extensions seem to be ok on both the Mac and the PC.
 Signature Dudley Henriques
dorayme - 01 Dec 2007 21:41 GMT In article <tomstiller-A69FD6.10562501122007@newsgroups.comcast.net>,
> What you may have missed in the exchange is that PHP is a /server-side/ > language which is interpreted at the server when the page is requested. > Depending on what actions it performs, a saved page may, or may not, > display the same content when loaded locally. The usual thing is for any php code that happens to be in the doc uploaded to the author's server to generate the html page. There could be any number of things the php is doing, from simple includes to more complex generation. But in the final count, html is served up to the browser. Look at the source code.
 Signature dorayme
william mitchell - 01 Dec 2007 21:49 GMT > In article > <tomstiller-A69FD6.10562501122007@newsgroups.comcast.net>, [quoted text clipped - 9 lines] > includes to more complex generation. But in the final count, html > is served up to the browser. Look at the source code. The OP doesn't have anything to do with the source code. The URL called for "filename.php". The server read the file "filename.php", translated it into a html file, and returned it to the OP. Unfortunately the only name the browser has is the one in the URL, "filename.php".
dorayme - 01 Dec 2007 23:00 GMT > > In article > > <tomstiller-A69FD6.10562501122007@newsgroups.comcast.net>, [quoted text clipped - 15 lines] > Unfortunately the only name the browser has is the one in the URL, > "filename.php". The source code is what determines how the browser presents the material. What the end user gets is a webpage, what is directly behind that page is an html text file, the user has no particular direct connection with the php in the author's document on the author's server. It is neither fortunate not unfortunate that the browser displays .php in the address bar, nor that it calls to get that named file from the server.
 Signature dorayme
Warren Oates - 01 Dec 2007 12:51 GMT > In other words, are you trying to solve a legitimate problem, or steal > someone's property? Are you a cop or something? Not everyone is a criminal. I download "premium content" all the the time ... ha ha.
 Signature W. Oates
dorayme - 01 Dec 2007 05:26 GMT > >> How can I download a web page to my IMac, save that page (in what > >> format?) on my system, then be able to send it to a PC so it can be seen [quoted text clipped - 28 lines] > there really isn't any easy way to save a web page as it appears on a > site to the Mac then send that page to a PC? No, there is an easy way. Just do this:
(1) open the web page with your tute in FF
(2) save to the desktop
(3) make a folder (as you said a post back) and put in the .php file and the folder with the images and maybe other things that FF made.
(4) change the .php to .html in the file name of the main "loose" FF saved file. It does not matter what you call your made wrapper folder. Do not change the name of any folder that FF has made because the html text in the "loose" and main file has that folder targeted in the names of its internal references for things like images.
Send your folder to your friend as an attachment, use any "windows friendly" attachment option in your Mail program (Mail has this, I have it set in preferences but you can do it on a per email basis via the Attach command. I say to do (4) in case IE plays up. (Win IE6 especially is a mule of a browser. But it will display a well formed .html file)
You can skip making the enclosing folder and/or zip up the package before sending by selecting the FF saved files (after you name ending adjustment) and choosing Create Archive under the Finder File menu. This zips the files and folders up, compresses them and I have had no trouble with Windows folk being able to open these.
 Signature dorayme
Dudley Henriques - 01 Dec 2007 05:36 GMT >>>> How can I download a web page to my IMac, save that page (in what >>>> format?) on my system, then be able to send it to a PC so it can be seen [quoted text clipped - 58 lines] > them and I have had no trouble with Windows folk being able to > open these. Thanks. I've printed this out and will give it a try. Someone else also suggested opening the file and going to a print dropdown, selecting PDF, and saving as a PDF file for archiving and sending out. This would mean the other end PC having Acrobat Reader which everybody has, so I came with none and now have 2 solutions.
:-)) BTW, you can read some of the tutorials I'm referring to at www.simflight.com. Just search (Henriques). I'm only suggesting this because of that idiot who suggested I might be stealing someone's work and selling it :-)) I do the tutorials pro bono as well as my work for Microsoft on their simulator program. Best as always, DH
 Signature Dudley Henriques
dorayme - 01 Dec 2007 07:37 GMT > Thanks. I've printed this out and will give it a try. > Someone else also suggested opening the file and going to a print [quoted text clipped - 9 lines] > Best as always, > DH Before that stage I did not know how your tute was organised. It is simple enough, mainly text.
Here is a version of it that is a quick patch up of the disgraceful <grin.. I know it was not your doing!> html code used on that site. This needs more tidying up but I offer it to you by way of illustration to see the advantages of posting the html to a web server and simply giving out addresses to friends in email.
http://tinyurl.com/373btx
You can also with this one simply follow the instructions I gave you for Firefox. Also, you can simply View Source yourself in any browser, and copy paste the whole thing into Textwrangler and save as whatever.html. Then get the mouse and drag the one image to the desktop. Simply now select both .html file and the image and Create Archive from the file menu and attach the zip file to your friends.
[btw, I loved reading your stuff! I like motor bikes and all this "Biggles" stuff a lot]
 Signature dorayme
Dudley Henriques - 01 Dec 2007 14:53 GMT >> Thanks. I've printed this out and will give it a try. >> Someone else also suggested opening the file and going to a print [quoted text clipped - 31 lines] > [btw, I loved reading your stuff! I like motor bikes and all this > "Biggles" stuff a lot] Yours actually looks better than mine :-))
I've printed out the directions. I'm sure it's a simple process once it's done a few times. Thanks for all your time and effort. It's a real learning process for sure getting to know your way around these different programs and procedures.
 Signature Dudley Henriques
Warren Oates - 01 Dec 2007 12:54 GMT > I'm only suggesting this > because of that idiot who suggested I might be stealing someone's work > and selling it :-)) I do the tutorials pro bono as well as my work for > Microsoft on their simulator program. You can safely ignore Balderstone. He occasionally has something useful to say when his meds kick in though.
 Signature W. Oates
Dave Balderstone - 01 Dec 2007 14:06 GMT > You can safely ignore Balderstone. And yet you do not...
 Signature Help improve usenet. Kill-file Google Groups. http://improve-usenet.org/
Warren Oates - 01 Dec 2007 14:31 GMT > > You can safely ignore Balderstone. > > And yet you do not... You didn't quote the rest of my post. Anyway, replying to your posts doesn't mean I'm not ignoring you ...
 Signature W. Oates
Dudley Henriques - 01 Dec 2007 15:33 GMT >>>> How can I download a web page to my IMac, save that page (in what >>>> format?) on my system, then be able to send it to a PC so it can be seen [quoted text clipped - 58 lines] > them and I have had no trouble with Windows folk being able to > open these. I just tried a simple change of the file extension to html and the page opened here on the Mac just fine. I'm assuming it opened in FF. I sent the html file as an attachment to my son on his PC. It should open there in IE if all is well. I've learned a lot today I think. Bit rusty, but getting better by the minute I think :-))
 Signature Dudley Henriques
John Yates - 01 Dec 2007 05:09 GMT > I have a situation where I write aviation tutorials that appear on web > sites. I also have a situation where I'm using an IMac OSX 10.4.10 with [quoted text clipped - 16 lines] > Can someone shed some light on this situation? I just want to understand > it better before downloading all those tutorials. Try the " file" --> "print" command. Hit the pdf button. Mail the tutorials out as pdf files.
Dudley Henriques - 01 Dec 2007 05:24 GMT >> I have a situation where I write aviation tutorials that appear on web >> sites. I also have a situation where I'm using an IMac OSX 10.4.10 [quoted text clipped - 19 lines] > Try the " file" --> "print" command. Hit the pdf button. Mail the > tutorials out as pdf files. GREAT IDEA!!!! and thank you very much. This is exactly the solution I need. All they need on their end in Acrobat Reader and I'm in business. I'll simply convert the tutorials to the PDF format and save them in that extension for sending out when needed. Many thanks. You've saved me a ton of problems. DH
 Signature Dudley Henriques
Frédérique & Her vé Sainct - 01 Dec 2007 09:03 GMT > > Try the " file" --> "print" command. Hit the pdf button. Mail the > > tutorials out as pdf files. [quoted text clipped - 3 lines] > I'll simply convert the tutorials to the PDF format and save them in > that extension for sending out when needed. I fully agree with the suggestion; additionally, you may hit a problem of pdf page size if you have too large webpages, but I know there is an utility precisely for this, that'll get your webpages and create actually longer pdfs. If you have the issue, search macupdate with "web pdf", it must be one of those: http://www.macupdate.com/search.php?directurl=1&os=macosx&keywords=web+p df
 Signature Frédérique & Hervé Sainct, h.sainct@laposte.net [fr,es,en,it] Frédérique's initial is missing in front of the above address l'initiale de Frédérique manque devant l'adresse email ci-dessus
dorayme - 01 Dec 2007 05:29 GMT > > I have a situation where I write aviation tutorials that appear on web > > sites. I also have a situation where I'm using an IMac OSX 10.4.10 with [quoted text clipped - 19 lines] > Try the " file" --> "print" command. Hit the pdf button. Mail the > tutorials out as pdf files. You can maybe do this. But best not to as it loses all the advantages of the webpage format.
 Signature dorayme
Michael Vilain - 01 Dec 2007 07:16 GMT > I have a situation where I write aviation tutorials that appear on web > sites. I also have a situation where I'm using an IMac OSX 10.4.10 with [quoted text clipped - 16 lines] > Can someone shed some light on this situation? I just want to understand > it better before downloading all those tutorials. According to
http://filext.com/file-extension/MHT
These are Microsoft proprietary web-archives. Near as I can guess, these are specific to the PC. Whomever is creating these files needs to provide a more "universal" format for you or you'll have to re-invent the wheel (e.g. write perl or C code to parse and fix them).
Good luck with that.
 Signature DeeDee, don't press that button! DeeDee! NO! Dee...
Dudley Henriques - 01 Dec 2007 14:49 GMT >> I have a situation where I write aviation tutorials that appear on web >> sites. I also have a situation where I'm using an IMac OSX 10.4.10 with [quoted text clipped - 27 lines] > > Good luck with that. Thanks much. I'm just now learning about file extensions and how some are used. It's frustrating but educational :-)
 Signature Dudley Henriques
|
|
|