Hey i got small problem getting an unknown curl error from my script "curl_error(): 180 is not a valid cURL handle resource".
Im not able to find any recourses about that error so maybe anyone has any experience with this.
Thanks already.
Heres the part which causes the error and
exact log: PHP Warning: curl_error(): 180 is not a vali...
Look at this ruby example:
puts ["Dog","Cat","Gates"][1]
This will output Cat as ruby allows me to directly access the "anonymous" array created.
If I try this in PHP, however:
echo array("Dog","Cat,"Gates")[1]
This won't work.
What is this called, not only concerning arrays but all functions?
Where else is it possible?
Feel f...
I am struggling to find out the syntactically correct way in which to add on more variables and rows to these statements:
/* WANT TO ADD ON FIVE MORE $_POST[''] */
if(isset($_POST['check_prof']) && $_POST['check_prof'] == 'checked') {
$check_prof = "checked";
}else{
$check_prof = "unchecked";
}
/* SAME HERE, WANT TO ADD THE OTHER FI...
I'm working on a system which will allow me to login to the same system via various domains. (www.example.com, www.mydomain.com, sub.domain.com etc)
The following threads form the basis of my research so far:
Single Sign On across multiple domains
Cross web domain login with .net membership
What I want to happen is that If I am logged ...
In my PHP code I've got references to a URL on another website. I'm testing my website locally (using XAMPP). Is it possible to get Apache to automatically replace the domain of this other website for localhost?
For example my PHP code might be:
<?php echo "<a href='http://www.othersite.com'>Click me</a>"; ?>
And I'd like for my...
I'm working on a class-based php web app. I have some places where objects are interacting, and I have certain situations where I'm using error codes to communicate to the end user -- typically when form values are missing or invalid. These are situations where exceptions are unwarranted ( and I'm not sure I could avoid the situations wi...
ive got an object that looks like this with print_r():
SimpleDOM Object ( [0] => continent )
i wonder how i could get the continent as a string?
i have tried gettype($object[0]);
it still says its an object.
i just want to get the string "continent".
...
I'm trying the following command in PHP 5.2.12 :
print (date('Y-m-d', strtotime('2009-12 last day')));
Regarding to the php.net manual :
date('m/d/y', strtotime('2009-03 last day')); # 03/31/09
it should display the last day of march 2009 (2009-03-31) !
Mine returns the last day of the previous month ? why ? :
2009-11-30
...
I'm done some Googling, and I've found nothing.
I'm scoping out writing a plugin for an editor I use, and I am wondering whether there is a way I can access the PHP documentation via an API? For instance, I'd like to get raw access to the information (besides the comments) located here: http://php.net/file_exists.
php.net seemingly use...
Scenario: the size of various files are stored in a database as bytes. What's the best way to format this size info to kilobytes, megabytes and gigabytes? For instance I have an MP3 that Ubuntu displays as "5.2 MB (5445632 bytes)". How would I display this on a web page as "5.2 MB" AND have files less than one megabyte display as KB and ...
Ok, firstly this is not about forms this is about consistent layout as a user explores a site.
let me explain:
If we imagine a (non-ajax) digital camera online store, say someone was on the DSLR section and specified to view the cameras in Gallery mode and order by price. They then click onto the Compact camera's page. It would be in t...
Hello,
I want to create a website where the main pages will be served from CodeIgniter. I will use Wordpress in the /blog/ sub-directory to host the blog. Thats it! I want nothing else. Just to make sure that:
example.com/somepage/ calls a CI controller where as example.com/blog/some-post/ is handled by Wordpress.
I don't need any kin...
i removed some elements from a xml file with simpledom.
the code:
$this->xmlDocument->removeNodes("//entity[name='mac']");
here is the initial file:
<entity id="1000070">
<name>apple</name>
<type>category</type>
<entities>
<entity id="7002870">
<name>mac</name>
<type>category</type>
...
Hello everybody,
I'm using this codes for listing custom field values into drop-down list element on this category in Wordpress (screenshot is here what i'm point out).
So there are duplicate items on drop-down list and how i can delete duplicate entries on list?
Thanks in advance.
...
I need a "find nearest location" on our website.
Where visitor enters their zip/postal code, then they are redirected to specific webpage for our nearest location. We have forty USA and Canada locations.
How can I build something like this? Could I do this with the Google Maps API? I already have a custom map on Google Maps. It's plo...
Array for example
$array = array(
array('first'=>5), array('first'=>4), array('second'=>3)
);
How sum values by keys for result:
$result = array(
'first'=>9,
'second'=>3
);
Thanks in advance.
...
I'll admit I'm not very adept at key verification. What I have is a script that downloads messages from a POP3 server, and I'm attempting to verify the DKIM signatures in PHP. I've already figured out the body hash (bh) validation check, but I can't figure out the header validation.
http://www.dkim.org/specs/rfc4871-dkimbase.html#rfc.se...
I apologize in advance, I am a PHP noob!
I have form with some hidden fields. I need the values to POST to "submit_rma.php" so that they're not missing from the db--I need $qty, $estmate_id and $rma_type.
The rest of the fields are just displaying data for the user and are readonly. Currently I only get value from the qty text field.
...
Hi, I wonder if someone can help shed some light on this:
I drop a cookie if a user arrives to the site with a specific key/value in query string. i.e.: http://www.somesite.com?key=hmm01
The cookie code exists at top of the template before <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML ) :
<?php
header("Content-Type: text/html; charset=utf-...
In my php application, I'm using $_SESSION to track whether a user is logged in. If a user leaves any page on my site at http://mysite.com and goes to http://someotherwebsite.com, I want to automatically log them out, such that if they return to any page on http://mysite.com, they need to login again.
Is there an easy way to do this?
...