chrishea 182 Nearly a Posting Virtuoso

OK, so go for it. Maybe you'll want to go to the documentation and look up "file_exists".

chrishea 182 Nearly a Posting Virtuoso

Why aren't you posting your questions on the Plesk / Modernbill forum?

chrishea 182 Nearly a Posting Virtuoso

In general, I found the Paypal documentation to be pretty good. If you read it carefully, you will probably find most of the answers. I have never used recurring payments so I can't say anything about that. See the link below for info on a module you can use for non-recurring payments.
http://innovationsdesign.net/wb_2.7/pages/tech-resources/php-help.php#question_14

chrishea 182 Nearly a Posting Virtuoso

Titanium is an open source package that brings a bunch of development options together into one place. It allows you to take one set of code and deploy it on:

  • Windows
  • Linux
  • Mac
  • Android
  • Iphone

Even better, you don't need to learn a new language. The development is based on a web approach so you can use HTML, CSS, Javascript, Python, Ruby and PHP. Titanium has a facility to run a program for testing and it can also produce a compiled output for each of the platforms. Running a program does not require anything other than Titanium. You don't need to have a LAMP environment. For the compiled version, the runtime code is all included in the compiled module.

I have just started to delve into it so there is a lot that I haven't tried yet but here are some initial comments:

  • The install is quite lengthy and a little bit complicated. You need to install the JAVA JDK and the ANDROID SDK in addition to Titanium. There are a number of other required/recommended installs but so far, I have only installed Python from that list. On Windows, you also need to make some adjustments to the Windows Path and Environment Variables.
  • PHP is the newest addition and currently it is only supported for the desktop.
  • There are some limitations on PHP. One of the small but annoying limitations is that Echo sends output to the console not to the output window. …
chrishea 182 Nearly a Posting Virtuoso

"Getting a little action" means you don't need to take a laxative.

The little gray-haired lady you help across the street is your wife.

There's nothing left to learn the hard way.

When you don't care where your wife goes, just so you don't have to go along.

Your supply of brain cells is finally down to a manageable size.

You're asleep, but others worry that you're dead.

Your friends compliment you on your new alligator shoes and you're barefoot.
___________________

As a senior citizen was driving down the freeway, his car phone rang.
Answering, he heard his wife's voice urgently warning him, "Herman, I just
heard on the news that there's a car going the wrong way on 280. Please be
careful!"

"Hell," said Herman, "It's not just one car. It's hundreds of them!"

Ancient Dragon commented: LOL +0
jingda commented: Nice +0
chrishea 182 Nearly a Posting Virtuoso

My concern would be your statement "I am a beginner web developer with not much code experience". This isn't a beginner project. If you can download a full folder and just have them start using the new version that wouldn't be too hard. If you want to update the existing folder with the new versions from the server that have changed, then that is more complicated.

There is a reason why services like Drop Box and Mozy have a local client that communicates with their server. As Ardav indicated, you need something on the local machine that has access to the local file system. If it was up to me, I would build the local client using Autoit and I would have a PHP program on the server that it can talk to. I would run the process from the PC end starting the program manually or with a scheduler. I have built a couple of processes like this and it works quite well. Autoit has some unique capabilities, it is relatively easy to learn and the syntax is quite similar to PHP. As I said at the start however; this isn't a beginner project.

chrishea 182 Nearly a Posting Virtuoso

Probably the easiest solution to create a PDF is to display it in the browser and "print" it to a PDF on the local disk using a utility like CutePDF. It could then be attached to an email.

If they really want to be able to email a copy with a click of a button, then you need to make this a PHP file. You can use ob_start and ob_get_contents to capture the form to a variable. You then feed that variable into HTML2PDF and produce the PDF file. You can see sample code for HTML2PF here. You can then email the form as an attachment. See my help item on emailing (with attachments) if you need help with that.

chrishea 182 Nearly a Posting Virtuoso

What you have shown is a static HTML form. Is this just sample output? If so, then what you need to post is the program that generated it? If not, why would you want a PDF of this page?

chrishea 182 Nearly a Posting Virtuoso

You shouldn't be adding on to an old post. You need to open a new one.

chrishea 182 Nearly a Posting Virtuoso

There are just too many students and other newbies who want you to do it for them rather than make some effort, do the research and give it a decent try before asking for help. It adds some traffic to Daniweb but it does nothing for the quality of the site. When people are clearly demonstrating that they are lazy and/or looking for an easy way out, they deserve some negative feedback.

diafol commented: very well said +0
chrishea 182 Nearly a Posting Virtuoso

It isn't difficult. Click on the link below for the details:

http://innovationsdesign.net/wb_2.7/pages/tech-resources/php-help.php#question_11

chrishea 182 Nearly a Posting Virtuoso

I don't understand how you have this configured. Normally sub-domains are entirely separate and don't share the same code. You could have parked domains pointing to another domain and then they would all be treated the same and share the same code but that is entirely different. In that case, you can check which domain name was used in the (common) code.

Please clarify.

chrishea 182 Nearly a Posting Virtuoso

When you remember having milk delivered to the door by a milkman in a horse-drawn wagon [but it's not as long ago as you might think].

chrishea 182 Nearly a Posting Virtuoso

The (unix) timestamp is defined as "...the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds".

Thus, it is a relative time in seconds. If you subtract one timestamp from another, you get the number of seconds between the two dates-times. You can convert a date to a timestamp with strtotime and you can convert a timestamp to a formatted date with the Date command.

chrishea 182 Nearly a Posting Virtuoso

It would be simpler to use 90 days than three months. If you have today's date (as a timestamp), calculate 90 days in seconds, add that to today's date, then compare the result to the timestamp for the date they entered; that will tell you if it is beyond 3 months or not.

chrishea 182 Nearly a Posting Virtuoso

If it's on a Windows server then maybe. Unless it's your own server, your web hosting company would need to be involved and they probably wouldn't agree. You could try it locally by defining it as a PHP extension in the php.ini file but it might not be compatible with PHP.

chrishea 182 Nearly a Posting Virtuoso

You may find these benchmarking results interesting.
http://www.webperformance.com/library/reports/windows_vs_linux_part2/

1000 simultaneous requests is a pretty big number. Is this a real problem or is this a theoretical question? If you have that much traffic, then your operation should be big enough to pay for experts to advise you on performance. If you are using a shared server then I would think that you need dedicated resources. Obviously, the results for any particular server will depend on the specific hardware and how it is configured. Once you pass the limits of an individual server, then you are into more complex load-sharing systems such as the one that linked to below:
http://www.ultramonkey.org/

chrishea 182 Nearly a Posting Virtuoso

Please clarify what "...but it's not working for auto generated emails from some email addresses." means (with some examples of what works and what doesn't).

chrishea 182 Nearly a Posting Virtuoso

You should explain why you are including counter.php twice and show us the code.

chrishea 182 Nearly a Posting Virtuoso

Post should work every time. You will need to provide a lot more info before anyone would have a chance of helping you.

chrishea 182 Nearly a Posting Virtuoso

$strcontent (line 8) can be any html (including the html that you are creating dynamically). The html2pdf examples read example files as the input but there is no requirement to do it that way. In your code, as you create lines of output, append them to $strcontent until it has the full output ( $trcontent .= ...)

chrishea 182 Nearly a Posting Virtuoso

There are different versions of HTML2PDF. If you look at this one, you'll find that it does include a <page_header> and <page_footer> command and they can include images.

chrishea 182 Nearly a Posting Virtuoso

This is an easy alternative that doesn't require a bunch of specialized PDF statements.
http://www.html2pdf.fr/en/default

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

You can see ratings for a number of hosting companies here.

I have used ICDSoft for many years. They provide high reliability and great service.

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

It appears that there should be another program that has a form and does a POST to this program. This program is processing the POST information that was sent to it.

chrishea 182 Nearly a Posting Virtuoso

It might be simpler to keep using the Perl scripts as they are. Have a look at the link that provides info on using the PHP and Perl together. Never tried it but it might be a viable option.
http://devzone.zend.com/article/1712

Here is a translation guide in case you want to try some conversion:
http://www.cs.wcupa.edu/~rkline/perl2php/

You probably won't find a conversion program but even if you did, it's probable that it wouldn't get everything right and then you would be into some serious debugging and you would need a good understanding of Perl, PHP and what the program is supposed to do to figure it out.

chrishea 182 Nearly a Posting Virtuoso

If this is on your test system have you checked php.ini to see that Curl has been activated (extension=php_curl.dll has to be uncommented).

chrishea 182 Nearly a Posting Virtuoso

You're right that a lot of developers have done this and that seems to indicate that the organization behind PHP isn't aggressively enforcing that part of the license. You could take your chances and ignore the license like many others have done or you can respect the license and take their advice on how you should name it. Calling it "Interactive Pages for PHP" still gets the message across and stays on side with the license requirement.

chrishea 182 Nearly a Posting Virtuoso

If you want to pass the array to another module, make it a session variable. That way it remains available to all modules as long as the session is alive.

chrishea 182 Nearly a Posting Virtuoso

You can write it out using any of the File functions (e.g. file_put_contents) under a a temp name ending with a .php suffix. You should probably be putting it in a separate folder just for that purpose. You can give the user a link to that temp program file. If this is software that the user will load onto his/her own site and this function is well protected, then there may not be a security issue (at least not for you). If it is on your own site, then you need to carefully consider the security hole that you are opening.

diafol commented: Needed to be said +8
chrishea 182 Nearly a Posting Virtuoso

If your key requirement at this point is to make dynamic changes to a form to build or modify it right on the screen, then you probably need to use Javascript. You could also do a version of this in PHP but it wouldn't be dynamic. You would have to design it so that the user picks the options they want then send it to the server. This is a pretty specialized requirement so I don't think that you want to use this as your criteria for deciding on a language to learn (unless you plan to specialize in building fancy GUI applications).

PHP is a very good all-purpose web programming language with a large user community and lots of free stuff available. Since it is server-based, you have to use Javascript with it if you want the fancy GUI features. Libraries like JQuery make that pretty easy but they may not have the specific capabilities that you need for your current requirement. Learning a language and becoming competent at it is a pretty significant investment of time. You need to consider what kind of programming your are going to be doing and what the key requirements are for it to make the right language choice.

chrishea 182 Nearly a Posting Virtuoso

You don't need a Framework to develop, upload or run PHP. You will need a development environment (with Apache, PHP and MySQL) on your PC and an FTP program to transfer programs to the server.
More newbie info

chrishea 182 Nearly a Posting Virtuoso

Good call by Ardav. One upvote.

chrishea 182 Nearly a Posting Virtuoso

Check all of the included files as well and if you're still stumped then you can always use obstart() to buffer any output as a quick fix (and then discard it at the end).

chrishea 182 Nearly a Posting Virtuoso

Your question is a bit unclear. What you seem to want to do probably isn't possible. If you are seriously asking how to interpret a bunch of bits in a graphic file and determine what it is then that would require some pretty serious artificial intelligence. Maybe the CIA has that sort of thing but I don't think that there is anything like that available to the general public, at least not yet.

chrishea 182 Nearly a Posting Virtuoso

You should be keeping the login status in a session variable and then check that where needed to allow (or prevent) the user to take specific actions. As you have already realized, you can't count on parameters attached to the URL to control this for very long.

chrishea 182 Nearly a Posting Virtuoso

If you built the scoreboard in PHP then you could build an API that would allow someone else to connect to it through the API. Is that what you want to do?

If so, then you might have a look at this:
http://particletree.com/features/how-to-add-an-api-to-your-web-service/

chrishea 182 Nearly a Posting Virtuoso

What is method=\"$_GET\">" supposed to be? Why aren't you using a simple method=get?

chrishea 182 Nearly a Posting Virtuoso

The simplest way is to provide a link and let the PDF file open in the browser. You can also have a look at this:
http://davidwalsh.name/read-pdf-doc-file-php

chrishea 182 Nearly a Posting Virtuoso

There are many free shopping cart packages that probably deal with what you want to do. Why start from scratch? From a customer point of view, I wouldn't want to use your credit card processing if you are doing it yourself. With PayPal, I have a reasonable level of confidence with their security. They also provide some buyer protection if things don't go well with the purchase. As a merchant, it is easy to get a PayPal account and start selling online. It isn't so easy to get a Mastercard and a Visa account through a Bank or a Credit Processor to do the same thing.

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

I don't think anyone will be good enough to figure out your problem based on what you have provided. It sounds as if your login may be accepting any password but there is no way to know what is going on without seeing some code.

chrishea 182 Nearly a Posting Virtuoso

You should be able to use a variable from the main program unless you are using Functions and the variable was defined in / being used in a Function without being defined as Global. If that is not it, then you need to post some code.

chrishea 182 Nearly a Posting Virtuoso

When you get an error on the last line of the program (or even beyond as in this case),
it means that PHP has gone through the module expecting to find a closing brace/bracket (or sometimes a closing quote) and it didn't find it.

In this case, it looks as if the IF statement on line 10 needs a closing brace (maybe on line 13). If you consistently indent your code, it makes it easier to find it.

chrishea 182 Nearly a Posting Virtuoso

What you probably want is a JQuery accordion that lets you click on the header to open the section. See the example below. Even though this example always has one section open, I have implemented accordions where all sections can start out closed.

http://jqueryui.com/demos/accordion/

chrishea 182 Nearly a Posting Virtuoso

If you see the php code when you try to execute the module then the most likely cause is that you didn't save the module with a .php suffix. If that is the case, change the suffix and try again.