How To Ouput PDF Directly To The Browser From PHP Script
I know how to ouput PDF directly to the browser from PHP script, but is there any way to
create a PDF file to the server harddisk from PHP?
View Complete Forum Thread with Replies
Related Forum Messages:
Outputing Image Directly To Browser
can one "stream" image data to a browser? I created an image using gd and when I do imagepng I just get the binary data for the image written as text instead of the image itself. Now I'm writing the file to a temp file and using html to load the temp but seems like a waste of cycles and space ;/ Anyway around this?
View Replies !
Ouput Formatting...
I would like to have the results of my query display in a grid format. The code below returns my thumbnails and links them to the actual images. However the entries in the database are simply paths to these images. I thought I could do this with CSS but the way this query is returning the results I am stuck and not sure how to resolve it. Any suggestions?
View Replies !
Select And Ouput
I'm trying to display a bunch of pictures in rows with 5 pictures per row. The filenames of the pictures are all stored in a MySQL database and the actual files are stored on the server. So, I know how to return and output all of the records from a MySQL table using a while statement. However, I need to only output five of them, insert a break in the HTML to start a new line, and then output five more and another break, and then do it again until there are no more pictures left. Anyone have any ideas?
View Replies !
Ouput Image
I am trying to output an image with text coming from a database" $image=mysql_result($result,$i,"image"); trying to output it like this: <img src=../prod_images/" . $image . " height=90> problem is that some images have a space in the text like "image 1". When it is outputted onto the screen, the browser does not read anything after the space. How can I get around this?
View Replies !
How To Ouput A Html Page To PDF ?
I been able to output data from MySQL page and put in into a generated HTML page using <TABLE>. Is there any fastest way to convert the HTML page directly into a PDF document for the user to download when the user click on a link, juts like the one (PDF Version / Printable Version) of Devshed.com?
View Replies !
Mysql/PHP To Excel Ouput?
I can successfully, output contents from two mysql tables into excel but I was wondering if there was a way of determining the actual layout - column sizes because at present they are all over tha place? .....
View Replies !
I'm Getting Strange Ouput In Url String
I've been getting strange output in my url string within my app lately. It adds stuff like ?1174406969965 when I'm not even posting a url string on my forms. This doesn't seem like a big issue, but I was wondering if anyone has ran into this before. Code:
View Replies !
HTML Ouput Gets Scrambled While Parsing
On a page I want to display rows of recordset, coming from a mysql database. The problem is that somewhere halfway, PHP seems to generate messed up HTML code for no reason at all. e.g: The first 54 records display correct syntax. Code bellow is an examlpe of a row ouput for record 54 Code:
View Replies !
Sorting LDAP Ouput With PHP3
I am wanting to create a telephone list of all users on a LDAP database. I have managed to extract the data, but cannot get the code to sort the results in alphabetic order , based on surname. My code:
View Replies !
Printing Directly From PHP
Currently I work in a school and I wish to build a PHP/MySQL portal which allows teachers to enter student exam marks online through the portal. The same site will provide reporting etc. and prints the result of each student on a separate page, which can then be sent by post. In order to print the results I wish to create a print button (or something similar) which once pressed, extracts the individual student details from the Database and sends them directly to the printer without outputting anything on the screen. IS this possible with PHP?
View Replies !
Streaming Content Directly?
Could someone tell me if there's a way to filter & stream the content of a different site directly to someone's browser (without redirecting the user to the other page)? Right now, I'm accessing my friend's site, filtering the data, and putting his content on a part of my page. I'd like to know if there's a way to speed this up. Saving his files to my host and then sending the data out again is taking more processor power than I'd like to be using for this task.
View Replies !
Reload Image Directly
I am uploading a new image to my database. The upload works ok and the new image is stored ok on server. The problem is can I force a reload on cache to display the new image. If I reload the page it works fine but if i dont then the old image is displayed.is there a way to force a reload of image.
View Replies !
Printing Directly And Emailing
i have a registration web page....on the last page i give out all the information of the registration (student ID, course ID, Name etc etc...) now what i want to do is ....Email all that information to the email of the student (which he/she has provided earlier in the registration process) and also let them print out that information "with a printer friendly page".
View Replies !
Can Php Read .xls Files Directly?
I'd like to be able to read a microsoft spreadsheet with php. I know that php can read mysql, so I was thinking that maybe it could read excel spreadsheets as well. Does anyone know if that can be done?
View Replies !
Number Rows Directly
I need to do something like this: SELECT row_nr, * FROM asdf LIMIT 10 The column row_nr should be 1, 2, 3 ... 10, but row_nr is NOT a value in the table, I need it to be "generated" some way in the query. The reason is that I want to do something like INSERT INTO table SELECT row_nr, * FROM and so on, And I need every one of those queries to be numerated (in row_nr) starting from 1 and going to as many rows as the query results in. how to solve this one?
View Replies !
Send An Email Directly
I am wanting to know how to send an email directly from my website. I want it to send an email to a user through a socket connection without me needing my own SMTP server or me using a 3rd party SMTP server. It should work something like http://www.mustap.com/phpzone_post_95_sending-email-in-php-the-hac but it should be something I can put into a production function.
View Replies !
Array Directly Into A Table
I have been doing some thinking and am trying to find a shortcut. I have an array that I would like to add directly to my db. This array contains 122 - 125 string values. My data base will have 125 fields. Is there a way to insert the array into mysql without doing the obvious which would be to make a single insert query that would name all of the fields and then somehow make a foreach to loop through the individual elements of the array. $fields = explode(" ", $record); //separates each tab separated value in array $record and puts it in $fields //Time to insert into database $query = "INSERT INTO residential(//definitely do not want to declare 125 fields here) VALUES(//$fields array)"; $result = mysql_query($query); //Run the query.
View Replies !
Sending Attachments Directly From Form
I have a form with a normal upload type form item, now when this form is submitted I want to attach it to an E-Mail, and then send it out. What do I do in the PHP form processing code to do this? Obviously I would use MIME mail, but what is the easiest way for me to do this. Specifically this is for attaching a Resume to a job application that will be sent to an E-Mail address immediately. So the file types will be the normal, '.txt', '.doc' etc.
View Replies !
PHP To Reading Directly From ISAM Files
Are there any utilities that would allow me to use PHP to read directly from an ISAM file? I have a customer who's application uses keyed ISAM files, but there is no ODBC driver available. We don't need to have writing capabilites, just reading. There doesn't appear to be any native support within PHP, so I am hoping to find a utility that I could modify for my purpose. The thought of writing something in PHP using direct file access commands (fopen,fread, etc) is a bit intimidating ! Perhaps someone knows of a "tutorial" on this ?
View Replies !
Cannot Access Session Variable Directly
Basically, a variable called $city_code is passed through the URL and picked up in the script. If that $city_code has not been set as a session variable, then I want to set it. For some reason I cannot access that city_code directly. So, if the city_code is SIN, then I want to be able to access it as $_SESSION['sin']. However, I can only access it as $_SESSION[$city_code]. I have included 2 echo statements in the script to show where it went wrong. The echo $city_code returns SIN. However. the echo $_SESSION['sin'] just returns Notice: Undefined index: sin. I should also point out that the script actually does what I want it to do, just that I cannot access the session variable directly. (say $city_code = 'sin') PHP Code:
View Replies !
Security Alert! The PHP CGI Cannot Be Accessed Directly.
I have installed php4.2.2 using the windows installer but i am having problem. I get the message: Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.
View Replies !
Stream From FTP Directly To MySQL While Parsing CSV
I have some files that sit on a FTP server. These files contain data stored in a tab-separated format. I need to download these files and insert/update them in a MySQL database. My current basic strategy is to do the following: 1) Login to the ftp server using the FTP library in PHP 2) Create a variable that acts like a file handle using Stream_Var in PEAR. 3) Use ftp_fget() to read a remote file into this variable (this is so I don't have to write it to disk). 4) Parse that data now stored in memory using fgetcsv() (again treating that variable as a file handle using Stream_Var). This produces an array. 4) Insert/Update the data in the array using DB in PEAR. This all seems to work and it means I don't have to write anything to disk. Everything is handled in memory so not temp files are needed. The downside is that some of these files are very large so the program can consume large amounts of memory. I want to see what I can do to reduce this memory usage. In a perfect world I don't need to keep the entire file in memory. As soon as a single line is read via FTP I should be able to pass that line off to the CSV parsing code and the MySQL insert/update should be able to take place as each line is parsed by the CSV library. I.E. I should have more than a buffer worth of data in memory at a time. A buffer would need to be able to store at least a entire line but my memory requirements would drop significantly. My problem is that I can't seem to be able to figure out how to do this with the current PHP libraries. It seems that most functions in PHP are not designed around the idea of piping streams of information together. The other restriction I have is that I am limited to just PHP 4.3. Any ideas or is holding the entire file in memory the best way (other than writing my own libraries).
View Replies !
Referencing Returned Objects Directly
Is it possible to directly reference an object that is returned by a function in PHP? ie this: echo ReturnAnObject()->SomeMember; instead of this: var $Object = ReturnAnObject(); echo $Object->SomeMember; 'cus I can't work out the syntax if it is. :-(
View Replies !
Use Exec To Run The Program Directly From The Server.
I have an image manipulation program that is run from commandline, I have never used exec before and I'm scared to becuase I don't want to mess up my server or anything. Basically, I want people to be able to upload an image, then arrange for some manipulations to take place on the file in a temporary batch file, then use exec to run the program directly from the server. The program is called nconvert.exe, and the main thing I want to do is convert DDS textures into BMP files, the command, from Windows "cmd" is: nconvert -out bmp %1 %1 being the dds file to be manipulated. How would I go about doing the exec part? I know how to do the upload, but not the exec.
View Replies !
Include Code Directly From A Database
I searched through the forums and didn’t see a discussion of my question so here it goes. Is it possible to use a php include() to insert code directly from a database? For example, if I have a file something.inc which contains the following: <?php …. Some php statements ?> and have in my index.php file the statement Code:
View Replies !
Running A PHP Script Directly From The EditPlus Editor
I recently installed both the PHPDEV2 package on my Windows 98SE Pentium 2, and I started writing PHP programs using the EditPlus Editor. Somewhere I read a comment about the possibility of running PHP scripts directly from the EditPlus Editor, but the writer (I forgot who it was) didn't tell how to do this.Can anybody help me with this? I hope this is not a trivial question, so that more people will profit from the answer(s)!
View Replies !
Access A Protected Page Directly, Without Logging In
On the first page a session variable ($_SESSION["admin"]) is created and set to true, if your login details are correct. On the pages being protected I then check to see if this session variable is true, and this works fine. The problems arise when I try to access a protected page directly, without logging in (impersonating an intruder). The code I'm using to check is just below, and further down is the error message. I don't get it really. I'm not sending any headers before checking the session variable. PHP Code:
View Replies !
Can I Put A Mysql Query Result Directly Into A Multidimensional Array?
I have two joined tables: Departments - which contains the department description and a key Positions - which contains position data What I'm attempting to achieve is to display the department title in one table cell and then list all the positions associated with that department in the cell under neither the title. I need to generate a table two column table with as many rows as required, depending on the number of departments, which is dynamic. Do this I'm trying to turn the result of my SQL query into multidimensional array e.g. dept = VioP positions = "designer", "engineer" etc, which I can do then use to generate the table. I've done a search on the forum and looked around the manual and I'm stumped on how to achieve this, a point in the right direction would be greatly appreciated. The query I'm using is below. PHP Code:
View Replies !
Sessions - Stop People From Directly Accessing The Edit Page.
i saw there was another thread about sessions, but i thought it would be best not to hijack his thread. Anyway, I have a password for my site, which passes the user onto another page to edit the content, but i need some help with sessions so that i can stop people from directly accessing the edit page. But all the examples i have seen dont go this far with the sessions, and i dont know where to go from here.
View Replies !
File_get_contents - Making A Browser Within Browser
im making a browser within browser (dont bother asking why), but the problem is when i use file_get_contents, it works, however, the original HTML doesnt use absolute locations of images etc... so it tries to look for them on my server . I tried using str_replace to change it but i cant distinguish between things which are relative and absolute references...
View Replies !
Passing Values Directly To A New Page And Using Them To Update Values
I'm trying to pass values through from one page to the next by clicking on an image. When I click an image it passes through the values for prodId and shopName This is passed through to my admin_update.php where I want to populate a table with all of the details stored on the product that was clicked on. The values are being passed through ok but the table is not being displayed. I have another update page but with this page i am using a submit button which is passing through the details. I tried using this method again but because there is no submit button used (I am just clicking on a link/image) it is not working for me. Code:
View Replies !
PHP Outside Of Browser?
I am working on several projects using PHP and MySQL and two of them will require monitoring incoming data from a source other than a browser, query the MySQL and send data to another non-browser output. I would like to do all in PHP, if possible. If not, any suggestions on a language for Linux that has easy interface to MySQL?
View Replies !
PHP Won't Run In Browser
for some reason when I goto run a PHP script in my browser, it tries to open/save the file instaed of actually running the script. I did do: AddType application/x-httpd-php .phpadded to httpd.conf But is there something else I'm missing in my setup?
View Replies !
Browser For PHP
Does anybody here know of a good tool for PHP that can aid refactoring when you're OOing? Something like a refactoring browser as in Smalltalk.
View Replies !
Browser
I try to access a php page, instead of running the script, I get a 'open/save as' application window. I tested to see if php is running using phpinfo() and it popped up fine, but when I try to pass a var or access the page using firefox or IE it treats the php page as a file to be opened rather than script to be run.
View Replies !
Browser
I have a simple form that calls a .php script once submitted. It's currently on a Linux server. The form data is sent via method="post" but the data isn't being sent by the browser. I have tested the form and .php script on another server on a different network and it works fine.
View Replies !
PHP In Browser
I've been viewing my php files fine using my localhost and MS windows and apache server. However, when i uploaded the files to my linux/ apache server, i can no longer view my files.. instead, it opens in dreamweaver. I've got AddType application/x-httpd-php. php in my conf file.
View Replies !
Emulating A Browser Using Php
I'm trying to access a web using php (fread) to parse bits of info from it but doesn't appear to work as the .asp page has probably been set to redirect php requests to a basic error page. Can anyone post point me in the direction to find any code that will appear the request is coming from a browser with all the usual User-agent stuff in it.
View Replies !
Browser Or Php Problem?
I have a form that is very large 289 fields and it occasionally has a display problem where all the fields are mushed (for lack of a better term) together and the user can not click into the field because the display and the coordinates are not aligned.
View Replies !
|