chrishea 182 Nearly a Posting Virtuoso
  1. Do you really need the snapshot? If you have the URL, you can display the actual page any time you need it in an iframe.

  2. I have never used imagegrabwindow but it has limitations and issues that you may not want to live with. Link.

  3. There are services available (with APIs) that are built to take such snapshots. Some have a limited free service so if you are only doing this occasionally, that might be good enough. You have to pay for the service if you don't want the limitations.
    Link

  4. You could save the page to a PDF using HTML2PDF (or some other PDF creation tool). You should be able to save the resulting PDF file directly to a folder on your server. You don't necessarily have to save the PDF file into the database. You can just save the (unique) name of the PDF into the database record and leave the actual PDF in a folder reserved for that purpose.

chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

3 Toyota Camrys: 2000, 2006 (Solara 2 door) and 2010 Hybrid.
All very reliable. Hybrid gets pretty good gas mileage for a fairly large car (35+ mpg in the summer). It has a lot of technology in it but Toyota engineers did a really good job so it doesn't break easily.

chrishea 182 Nearly a Posting Virtuoso

HP I don't trust HP. Had one and it broke down after a couple of years because of overheating. This was a widespread problem but no help from HP.

Dell Limited experience with these. My son had one that had a serious overheating problem.

Toshiba's reputation (as per the example above) is good machines but very poor customer service.

ASUS Seem to be pretty good machines at pretty good prices. I believe that Asus and MSI manufacture their own where most other companies outsource the manufactuting. I have had one for a few years that is still running fine. My son recently bought one and he is happy with it.

Lenovo/IBM I bought a used one of these (T510) about 6 months ago. I had Thinkpads at work for many years and I always found them to be very solid. I am very happy with the one that I bought. Don't know if the more recent Lenovo's are up to the same standard.

chrishea 182 Nearly a Posting Virtuoso

I tried mini PHP Studio, one of the programs designed to do desktop PHP. It worked but it wasn't really a serious development environment that you'd want to invest a lot of effort into.

If your real question is "can I use my PHP coding skills for a desktop app" then I think that the answer is a qualified yes. I've been using PHP for the web and Autoit for the desktop for quite some time and it's pretty easy to go back and forth. I think that the developers of Autoit had quite a bit of PHP experience so there is a lot of similarity.

Here is a simplistic PHP example:

<?php
/*
     A very simple PHP example intended to compare to an equivalent
     Autoit program.
*/     

     echo "<br>A simple PHP example"; 

     $a   = 5 + 1;

     $b   = $a + 1;

     echo "<br>The result is ".$b;

     echo "<br>The End";     

?>

Here is some equivalent Autoit code:

    ;  A very simple Autoit example intended to compare to an
    ;  equivalent PHP program.


         MsgBox (0,"Example","A simple AUTOIT example");

         $a   = 5 + 1;

         $b   = $a + 1;

         MsgBox (0,"Example",@CRLF & "The result is " & $b & @CRLF & "The End");

I know this is really simplistic but the point is that the processing code is quite similar. Since there isn't a default output window in Autoit (equivalent to the browser window in PHP), I used MsgBox which pops up a small message window. I could …

chrishea 182 Nearly a Posting Virtuoso

It looks as if someone has already done this:
Click Here

They used something called "Cloud It Up" to convert Open Office to an online version.

These aren't free and PHP probably doesn't really come into. Doing something in PHP probably means re-creating Open Office using PHP and that would be a pretty massive undertaking.

chrishea 182 Nearly a Posting Virtuoso

You have fields within single quotes within the longer string that also uses single quotes. Simplest fix is to use double quotes on line 25 and 38. I don't see a purpose to your closing bracket on line 39.

chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

If you want to run PHP on your local machine you should install a LAMP package (usually called WAMP if it's on a Windows machine) that provides you with your own local server and supports MySQL (and usually SQLite) databases. PHP is part of the package but you also need a version of Apache and MySQL. I use a package called Uniform Server (Uniserver). There are quite a few others including WAMP and XAMPP. You just install the package, put your code in the right folder and you can be up and running without having to really understand the internal complexity of assembling an environment that works.

If you want to run PHP as if it was a desktop application (ie without any server environmentat all - even local), that isn't a common way to do it and there isn't much software available to support it. PHP is meant to be run using a server environment.

chrishea 182 Nearly a Posting Virtuoso

I have used the php-excel-reader quite successfully. I don't believe that it handles the newer formats (xlsx) so if that is required there are other tools available. You can also have a look at this.

baloch123 commented: Thanks +1
chrishea 182 Nearly a Posting Virtuoso

When I need to produce a PDF file, I use HTML2PDF. In this case it would require some extra work to read the Excel file and generate a report output in the format that you want in PDF. If you can get PHPExcel working it will probably be less work but if not, this is another way to do it.

chrishea 182 Nearly a Posting Virtuoso

I don't know anything about vbs but I did manage to find an answer just by doing a bit of digging (http://www.php.net/manual/en/function.exec.php)

If you use the format:

exec('start /B "my_window" "vbs/hello.vbs"',$output,$return);

Then it opens the VBS in the background. My VBS program was just a MsgBox. If you want to open a proper window from the VBS or capture the output (try sleep in the PHP program), then you will probably have some further challenges that will require a bit of research / experimentation.

chrishea 182 Nearly a Posting Virtuoso

It's easy enough to set a flag (by user) in the database to indicate that the email has been sent. The more important issue is: Can this set of conditions occur again, necessitating a further email? If so, there has to be some sort of reset process to end the first occurrence and set everything back to "Normal" and unset the flag. Otherwise you have the opposite problem and you'll never send another email after the first.

chrishea 182 Nearly a Posting Virtuoso

Apprenticeships seem to be fairly common in the UK but not in North America, at least not any more. I went through a company programming school many years ago not long after I got started in the IT business. I don't think there are many companies (at least in North America) that do that sort of thing anymore.

I think that many of the comments that you saw in this thread (including mine) are quite true if you are in the US or Canada. Since you are in the UK, it appears that you have some apprenticeship options. Looking up "IT apprenticeship program UK" provides links to quite a few companies with such programs.

chrishea 182 Nearly a Posting Virtuoso

If you are "just" a good programmer and need to have other people to give you the specs for what needs to be done (and want a steady paycheck), then you need to get a job working for someone else and that will be an uphill battle without any sort of formal qualifications. Having a college / university degree/diploma provides a potential employer with some assurance that you've learned at least some basics. It also demonstrates that you finish what you start, have a certain amount (or maybe a lot) of intelligence, can meet deadlines for assignments, can communicate adequately and so forth. If you can't provide this third party stamp of approval, then you are asking the employer to evaluate all of these things based on an interview and maybe some limited evidence that you can show him/her. In many / most cases, the employer can't be bothered trying to figure out if you can really do the job without that third party validation. The fact that you believe you can do it doesn't count for too much.

For the limited number of employers who might be prepared to give you a chance, you will need to be able to demonstrate the range of skills that they are looking for. It isn't just about coding and learning languages. You might even end up taking a job where there is no coding (e.g. doing system testing). They will want to have a good feeling for your business skills and people …

chrishea 182 Nearly a Posting Virtuoso

Try changing line 16 to use == in the comparison and see if that makes a difference.

chrishea 182 Nearly a Posting Virtuoso

The rebels are allied with Al Qaeda and very anti-US. They are probably worse than Assad. They are being strongly supported by Saudi Arabia who would like to get the US involved as well. This is no-win for the US (except maybe the arms companies who like to have the US at war with someone).

There are some claims that the rebels have used chemical weapons supplied by Saudi Arabia. If both sides were using chemical weapons, then who do you bomb? In reality, it seems like more of a pretext for involvement than anything else. It is estimated that there have been about 100,000 casualties so far. When you're dead you're dead. How much does it really matter whether it is from gas, a bullet or a bomb, especially if you are an innocent civilian.

chrishea 182 Nearly a Posting Virtuoso

It's brighter and busier than before. Initial gut reaction was that I like it better than the previous version.

As mentioned previously, it isn't mobile friendly. Had a look on my Samsung Galaxy S2. It doesn't scale down to the size of the screen (should probably have a viewport parm for mobile users). Couldn't get the drop-down menus to work. When you open a post / "article" the menu goes to 2 lines. That and the purple header occupy almost half the vertical height of the screen (when viewing on the long side) and, of course, they don't scroll up so you end up using only half the height when reading anything.

Overall, on PC pretty good. On phone, needs work.

chrishea 182 Nearly a Posting Virtuoso

If you look carefully you will see that you have an opening double quote before the Select on line 6 but there is no closing double quote on line 7.

Errors in PHP often point to the first symptom of an error rather than the specfic cause. You have to work backwards on the preceding line(s) to look for missing quotes, brackets, braces or semi-colons. PHP is looking for a match for an opening (,{,[,",' and only recognizes that it has an error when it finds some sort of illogical situation. In this case, it finds another double quote on line 9 followed immediately by the 'Y' but recognizes that this can't be the closing double-quote for the preceding line so that's when it reports an error. There are probably good reasons why the error message isn't more direct but the result is a fairly obtuse indication of an error. This sometimes makes the finding of the actual error a bit challenging, especially if the code isn't clean and simple.

BadManSam commented: Thank You +1
chrishea 182 Nearly a Posting Virtuoso

Attachments require the file name and a type as in:

$m->Attach( "files/file1.jpg", "image/jpeg" ) ;
$m->Attach( "files/file2.jpg", "image/jpeg" )

Use multiple attach statements for as many files as you want to attach.

chrishea 182 Nearly a Posting Virtuoso

You can certainly roll your own (including attachments) any time you want to send an email but why bother? You just include the module, add half a dozen lines of code to your program and you're done (for the whole thing not just the attachments). Are you that concerned about minimizing the size of your module at the expense of your own time? How much time have you already spent doing the code, doing the post and so forth? How much time will you need the next time you need to do some email code in a year or two?

When I first started doing PHP, I tried to do email code with attachments from scratch and I found it hard to get the attachment part working. That's when I went looking for an easier alternative. I didn't write this module (I did make a few changes) but it solved my problem. I no longer waste any time working on email code, it just works. As recently as last night, I had a need to send some emails from a system that I am writing and I just added Libmail and the job was done. I also have to send some text messages so I will use something that I wrote before as the basis for that. You don't need a Framework to be efficient (contrary to he impression some people have) but you do need a library of stuff that you can use so you can avoid re-inventing the …

chrishea 182 Nearly a Posting Virtuoso

I use a module called Libmail. It works for me every time.
[Click Here]

chrishea 182 Nearly a Posting Virtuoso

I've been watching this thread and I'm still not sure that I understand why this is a problem (but I may be missing something). If you can assemble the information into an html table (and put that into a variable), it's easy to create a CSV file. Unless you have a massive amount of data, it shouldn't be a problem reading it from your db tables and creating an html table for the data.

I created an include module a while back that can be used to generate a number of different file types, including CSV. The module is quite simple and it's more of a demo of how easy it is. It includes some example code to use it. You can find it here.

chrishea 182 Nearly a Posting Virtuoso

You have to take online ratings with a grain of salt but I looked at this one and the ratings for Media Temple seemed rather mixed. I have seen a lot of user concerns with GoDaddy. There are many hosting options and probably many that would be better than either of these (including the one that I use).

Click Here

chrishea 182 Nearly a Posting Virtuoso

I have never used a server that uses Plesk but let's just deal with it logically:

  • Plesk is a control panel facility. To install an application, you may not need to use Plesk at all. Installing a PHP application usually involves uploading the code to the right directory on the server (using FTP) and setting up the config file. If you need help to understand how to get an application installed, you should start with your Hosting Service Support people.
  • If you want to use PHPList, then you will probably need to adapt to it (not the reverse) unless you have the expertise to make changes and if it is important enough to create a non-standard copy of the system (impacting support and upgrades). Most of these systems provide the ability to upload a 'customer' file (usually from a spreadsheet, csv or text file). You will probably need to dump your existing files to a spreadsheet and you may need to do a bit of reorganizing of the fields.
  • If you have a good web host with good quality facilities, you can probably send a lot more than 100 emails per hour. That doesn't change the work you need to do but it does seem like a very low expectation.

You have the option of building your own program to generate emails. If your requirements are relatively simple, it isn't all that difficult (and you can incorporate your exisitng database). You need to decide if that makes more …

chrishea 182 Nearly a Posting Virtuoso

From the MySSQL documentation:
The Access denied error message tells you who you are trying to log in as, the client host from which you are trying to connect, and whether you were using a password. Normally, you should have one row in the user table that exactly matches the host name and user name that were given in the error message. For example, if you get an error message that contains using password: NO, it means that you tried to log in without a password.

Servers are normally named "localhost" (including, but not limited to your local test server).

You could try removing the quotes around the variables on line 18. This may cause a problem with your other mysql statements as well.

chrishea 182 Nearly a Posting Virtuoso

For PDF output, I prefer to get it right on the screen and then use HTML2PDF to produce the file. It uses TCPDF behind the scenes but the interface is very simple. The main requirement is that the html to produce the output has to be proper (i.e. closing tags for everything) with no shortcuts.

I presume in your post you meant 3-up labels (not 30).

pritaeas commented: Interesting. +13
chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

I use this for importing. With respect to modifying it in PHP, that's just some standard code that you'll have to write. If the modifications are on a record-by-record basis, then you just populate the form with values from the DB and save the result. If you want to display multiple records in a spreadsheet-like grid, then you should look into JQuery code that can do that.

chrishea 182 Nearly a Posting Virtuoso

I don't intend to debug your code but I can tell you that the code that I sent you the link for will sort a two-dimensional array. When I originially put it together, I spent a lot of time researching how to do it. This solution was based on what I found. If you don't find it helpful then I obviously don't understand your problem. That's all I have for you so good luck.

chrishea 182 Nearly a Posting Virtuoso

Sorting a multi-dimension array takes some pre-work before you sort to make it work. Follow the link and have a look. I think that will solve your problem.
Click Here

chrishea 182 Nearly a Posting Virtuoso

PHP normally only sees the data when you submit the form. If you want a PHP program to process the data 'live' then you will need some Ajax to do that. It can get data entered into the fields and call a PHP program to deal with it.

chrishea 182 Nearly a Posting Virtuoso

miniPHP Studio does allow you to build a desktop application using PHP. It's less than perfect and your app may require some re-engineering to go from a server to the desktop. It can work but you have to decide if it is worth the trouble or if you are better off just rebuilding it.

chrishea 182 Nearly a Posting Virtuoso

Sending an email isn't that difficult unless you get into some of the options like sending attachments. I use a module called libmail that you can download and use to make it easy.

Sending text is like sending an email except for the format of the address to send it to. For more info click here.

chrishea 182 Nearly a Posting Virtuoso

It might just be the code but you should check that your web host allows this. I know that mine doesn't.

chrishea 182 Nearly a Posting Virtuoso

It might be easier to get into some other kind of role first. You need to do some research. If you see some other types of jobs advertised and it isn't clear what sort of training and experience they require, don't be afraid to give them a call and ask. As per Ardav's question, part of your thinking needs to be about your long-term vs short-term interests. Where do you want to be in 5 or 10 years in terms of a career? If jumping into the work force immediately doesn't get you there, then you might want to reconsider your priorities. Some people like Steve Jobs are good enough (and impatient enough) that they can be successful without having a university degree behind them. For most of us, not having a degree can be a serious career limitation.

chrishea 182 Nearly a Posting Virtuoso

Education doesn't come with any guarantees but it might expedite your learning and it can be helpful in giving you credibility with a potential employer. Also remember that you might need to start somewhere else in order to get to where you want to be. In the IT industry, there are many different kinds of jobs so you could potentially start somewhere else even if your longer-term intent was to become a programming guru. There are networking, help-desk, computer operations, quality-control testing and various other kinds of jobs that may be available. They also need people who can do more mundane jobs like pulling cables through raised floors. Some of these types of jobs only exist in bigger companies so again you need to look at the ads and see what is available in your area. Doing something that's easier to get into while taking some (programming?) classes at night could be a combination that works.

chrishea 182 Nearly a Posting Virtuoso

Hi Greg and welcome to Daniweb.

Some observations for you:

  • Getting your own place, getting a job and learning web development are all separate items that might not be tied together. It might be ideal for you if they all came together (quickly) but that might not be realistic, at least in the short-term.
  • Depending on your time-frame to move out, a minimum-wage job may be all that you can find so you may need to plan based on that. I don't want to be a pessimist but people with college educations are taking minimum-wage jobs in some cases because they can't find anything else.
  • There are a lot of people with some amount of software / web development training, knowledge and experience. There are also people in third world countries with very good training and skills who can be hired online. Compared to what we expect to be paid in North America or Europe, they work cheap. I mention this because they would also be part of your competition.
  • Before trying to use web development as your ticket to an independent life style, I think that you need to determine if it is something that you enjoy and if you have the natural ability and personality to be good at it. You can start small by learning some HTML and CSS and creating some web pages. Once (if!) that is going well, you can start dabbling in PHP and databases (followed by using javascript tools like JQuery).
grekos commented: Very helpful, honest post. Made me think a little more realisticly then I previously was. +0
Zagga commented: Great post +5
chrishea 182 Nearly a Posting Virtuoso

I think that you need to consider / explain how you want to accomplish this in a bit more detail. It seems that you need to keep track of who is active and the time of their last activity. If they have closed the web page for your site, then you won't have anything running on the server for that session (that can access session or cookie data). You probably need some sort of timed task that will periodically check the time of last activity for whoever you believe to be online and mark them as offline if the last activity was older than some pre-determined period (e.g. 30 minutes).

chrishea 182 Nearly a Posting Virtuoso

When PHP gives you an error, you need to spend some time desk checking the code to see what you missed. That is a part of programming in PHP as much as writing the code. PHP can't always pin it down to the exact line but it is often the preceding line and occasionally it can be many lines before. When it tells you that something is "unexpected", it almost always means that you have a syntax error on, or prior to, the line number that it reports to you. So, if you carefully check the syntax on line 54 and the immediately preceding line, do you see anything missing?

chrishea 182 Nearly a Posting Virtuoso

if you post your code with code tags, that would help.

chrishea 182 Nearly a Posting Virtuoso

There are other ways to produce a PDF file but I find it simplest to create the output in html first, make sure that it is all displaying correctly and then let HTML2PDF convert it. You need to ensure that the HTML is complete (e.g. every opening tag has a closing tag) but as long as you do that, it works pretty well.

chrishea 182 Nearly a Posting Virtuoso

There isn't an easy and obvious solution for this. You can generate a PDF with PHP but pulling it apart is a different matter. The easiest solution would be to generate a file at the source that has exactly what you want and then all you have to do is to display it. This could be a second version of the existing file. Trying to take an existing PDF file and then rework the content to give you what you need is certainly the hard way and may not be do-able.

A second best alternative, if you can find something to do it, would be a PDF reader which will take a parm for the pages that you want to display. I'm not aware of one, but you might find something if you do a search.

The least likely to succeed would be trying to read the content and manipulate it. The programs that can do this with some success are desktop applications. They often aren't 100% with graphics. I am not aware of any that have an API that lets you get detailed access to the content.

chrishea 182 Nearly a Posting Virtuoso

You should start looking at the ads in Craigslist or commercial job posting sites like Workopolis and Monster.com. It will start to give you a feeling for what companies are looking for. Obviously, it will vary but a good knowledge of html and css is a given. A good familiarity with using SQL databases is also a given. Many will probably want some knowledge of Javascript or familiarity with Javascript libraries like JQuery. At least some knowledge of OOP and frameworks might be helpful as well. You'll want to be able to demonstrate what you know so having some well structured and well documented programs available that you've written would be helpful. You'll probably find that companies are generally looking for a pretty broad skill set and pretty strong ability in PHP and some of the other areas. It isn't too likely that you'll see an ad looking for just 'basic' skills. Thus, getting some experience working with advanced PHP systems would be to your benefit. There are lots of open-source systems available so you might want to pick one or two of the more popular ones, download them and then explore how they work.

chrishea 182 Nearly a Posting Virtuoso

These are just notices. PHP prefers that variables be defined before they are used but it will create them as it finds them. If you don't want to see the notices, you can change the error_reporting in the program or in the php.ini file.

The error message line numbers aren't in sync with the listing of the module that you provided so something must have changed in the module since you copied the errors (but that doesn't matter much, the notices would just have different line numbers).

chrishea 182 Nearly a Posting Virtuoso

I think that you need to check the variables that are sent from the form module to make sure that it is actually receiving the result from the Captcha.

chrishea 182 Nearly a Posting Virtuoso

Those who spend time helping to provide solutions deserve, but very often don't get some positive feedback. Maybe showing something as solved isn't treated by everyone as being significant but you have to take what you can get. As mentioned, many op's make a single post with their issue and are never heard from again. I think it is worth encouraging people to provide answers, otherwise this whole process doesn't work. If that encouragement has to sometimes come from the forum (through the moderators) instead of the OP, then that's ok (with the understanding that it's a bit more work for the moderators). To make it easier for the moderators, it would be good for other experienced contributors to recommend posts that deserve to be closed as "deemed as solved". Maybe there should be a separate status for ones that are forced to solved status rather than shown as solved by the op (even though they would both count in the solved count). For anyone who is looking for a solution to their current issue, finding an old post that is "deemed as solved" provides a higher level of assurance that it is a correct answer than nothing as all (i.e. dead silence).

On the flip side, I think that anyone who makes a post that is replied to but then does not provide any feedback (pro or con) within a certain period of time should automatically lose reputation points (with the rules updated appropriately). It would also be …

chrishea 182 Nearly a Posting Virtuoso

If you don't find something better you could build your own from the info on this site.

chrishea 182 Nearly a Posting Virtuoso

What is surryussface flu?

chrishea 182 Nearly a Posting Virtuoso

Facebook and other large applications are built with PHP and MySQL so they can handle large scale apps. Also cheaper, probably simpler and lets you run under Linux (or Windows if you really want to).