Skip to content

Tag: php

Convert tiff to jpg in php?

I have a server which holds TIFF images. Most clients can read and display TIFF images, so there’s no problem. However, some clients can’t handle this format but can handle JPG. I thought of using PHP’…

FTP upload via PHP form

I want to upload a file via FTP upload in a form. Here is the PHP file: The FTP connection connects successfully but the file is nowhere. Can anybody help me? Thanks! Answer Because you have <input name=”uploadedfile” type=”file” />: Because you need the filename of the temporary…

How to create a custom JSON layout from MySQL in PHP

I have a MySQL query in PHP that pulls back two columns of results Column One is Label Column Two is Value I have read http://nitschinger.at/Handling-JSON-like-a-boss-in-PHP but im struggling to understand how I can do the following JSON in PHP from MySQL I can manually write a loop to output the raw text to …

Using the “new” keyword in constructors

I’ve recently read that using the keyword “new” in a constructor is highly frowned upon, but I’m not sure I understand why? For example, how is: class A { public $foo; function __construct() …

php – detect if email is sent

Im building an automated newsletter, im kinda stuck with this problem. I need to know if the email was sent or not. Here is my code @$send = mail($emailRecipient, $subject, $message, $headers); i …

Salesforce to magento integration

This is my code… I am just trying to create a lead in salesforce using this code. This is a sample php toolkit code for salesforce. But when I am trying to run this code. It does not generate any lead in salesforce. My login credentials are correct and security token is also correct. Where am I going wr…