Hello
I am trying to functions:
1. imagecreatefrompng 2. imagepng
my php code looks like this:
<?php
ini_set('memory_limit', -1);
try{
//if(!$image=imagecreatefromjpeg('zee3.jpg')){
if(!$image=imagecreatefrompng('leo.png')){
throw new Exception('Error loading image');
}
imagepng($image, 'leoAfter_9compression1.png...
Hi,
I am building (in PHP) a SOAP server that is configured by its WSDL to accept messages that look like this:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://my.awesome.namespace/">
<SOAP-ENV:Header>
<ns1:Header>
<ns1:APIKey>E4C5BDE0-48DC-543C-1CA3-8E55C63F8E...
I need to center some floated divs inside a container. The code I'm using works but I need the last row of floated elements to be aligned to the left and not centered. It's a photo album and all the thumbnails are automatically generated by a gallery script.
This is what the code produces
This is what I need
I don't think this is pos...
Hi,
I have an input search on the site and I want to search in the database (MySQL) after province name.
In database I have just the provinces initials - ex: QC for Quebec, AB - Alberta, etc.
The people can introduce into the input search field: QC or PC or Province du Québec or Province Quebec or Quebec or Québec (capital letters or ...
I was looking at templating systems for php, and I've come to believe that pure php code seems to be the solution I want to use.
I'm the lone developer, so there's no designers who need a nerfed arena to work in. Template engines like smarty seem to suffer from the "Inner-platform effect". If I stick with good practices ( pre-computed ...
I come from Java / Objective-C to PHP and find it horrible. I mean, PHP is nice, really. But when you look at a bunch of variables, you don't know: Is that an number? Is that an string? Or ist that even a fancy object that can perform actions when calling methods on it?
So I wonder if there are helpful re-usable naming conventions for v...
What I'm doing is this:
I get a list of ID values (numeric) from the DB and store it into an array (1, 2, 2, ...)
I then count the duplicates with array_count_values. this outputs ([1]=>1, [2]=>2, ...)
I then want to reorder the array in a descending order via the count
I then just use array_keys($array) to get the IDs in a count order...
i want to loop an array with foreach to check if a value exist. and if it does, i want to delete that element.
i have following code:
foreach($display_related_tags as $tag_name)
{
if($tag_name == $found_tag['name']);
// DELETE CODE
}
but i dont know how to delete the element once the value is found. ho...
I'm using getTraceAsString() to get a stack trace but the string is being truncated for some reason.
Example, an exception is thrown and I log the string using:
catch (SoapFault $e) {
error_log( $e->getTraceAsString() )
}
The string thats prints out is:
#0 C:\Somedirectory\Somedirectory\Somedirectory\Somedir\SomeScript.php(10): S...
I have a bunch of URLs to parse in PHP, like this:
www.example.com/shopping
shopping.example.com
example.com/pages/shopping
for about 100 different pages (not just shopping - some are contact, some are directions, etc.). I have a seed set of data, which tells me where to look for the page names, like this:
www.example.com/[pagenam...
Hi
I have a form that passes something like in a URL
?choice=selection+A&choice=selection+C
I'm collecting it in a form with something like (I remember that $_GET is any array)
$temp = $_GET["choice"];
print_r($temp);
I'm only getting the last instance "selection C". What am I missing
...
I am using a wordpress plugin that sets up a basic contact form on a website. After filling in the fields and submitting, I get the dead letter message. I have read what a dead letter is, but I don't understand why I am getting the message. The email is actually sent to the recipient, but he does not like this error showing up and scarin...
i get some data from mysql.
$result = $forum_model->get_info($_SESSION['group_id']);
// step 1
while($user = mysqli_fetch_assoc($result))
{
some code
}
but when i later some lines beneath want to use the same data pulled out from mysql it doesnt work.
// step 2
while($user = mysqli_fetch_assoc($result))
{
some code
}
is...
A client's web host recently changed servers on them and it's broken some of the administrative tools. I'm providing a YUI WYSIWYG editor for them to create content on the site. The HTML content is now being "cleaned" by something before I get to it. For example, a link tag like
<a href="http://www.stackoverflow.com">
gets turned i...
Hey
I'm using php and fsockopen to connect to port 80 on another server to read content from a website.
I'd like to use the same function to access port 25 to read the mail servers header. Port 25 us being used by my mail server on my server.
Is it possible to connect to port 25 on the other server from port say 99 on my server (Or an...
hi,
i have been trying to set my XAMPP to work with xdebug php debugger, i have edited the php.ini file with the following parameters:
zend_extension_ts="C:\Program Files\Development\xampp\php\ext/php_xdebug-2.0.5-5.2.dll"
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
after ...
I've got a CakePHP search form that has 'type'=>'get'. Basically, one of the elements in the form is a submit button of type image. When the form is posted, in the URL I always get these x & y coordinates of the image submit button:
http://site.com/controller/action?x=22&y=36&query=hello
Is there any way I can prevent the coor...
For a grouped product, I would like to display a link to the simple products it is composed of. For example, if I have a grouped product called Dining Set composed of plates, knives, forks, etc. I'd like each of the subproducts to have a link to that subproduct (click plates goes to the Simple Product for plates)
<?php foreach ($_associ...
ive got an array like this:
$display_related_tags[0][20] = 'text1';
$display_related_tags[1][21] = 'text2';
$display_related_tags[2][22] = 'text3';
i want to either check if value (text1) exists or if key (20) exists but the mentioned array functions just apply to one dimensional arrays.
what are my alternatives without having to use...
All,
I have the following PHP5 code.
$request = NULL;
$request->{"header"}->{"sessionid"} = $_SESSION['testSession'];
$request->{"header"}->{"type"} = "request";
It appears that line 2 and 3 are producing the following error:
PHP Strict standards: Creating default object from empty value
How can I fix this e...