Is there any limits in the max amounts of concurrent connections a multi curl session make?
I am using it to process batches of calls that I need to make to a API service, I just want to be careful that this does not effect the rest of my app.
A few queries, do curl sessions take up the amount of connections the apache server can serve...
I'm working on some code for my blog that displays comments. This is the code that outputs comments from the database:
$i = 0;
while ($i < $num) {
$name = mysql_result($result,$num - $i,"name");
$dream = mysql_result($result,$num - $i,"dream");
echo "$name<br>$dream<br>";
$i++;
}
I'm currently using CSS to apply a style to the enti...
I see that all of the good date/time functions are PHP5 only, which sort of makes this hard. I need to generate a list of all pay-period-ending dates starting with 52 weeks back and going to one pay period in the future, with bi-weekly periods.
So, suppose the next pay period ending is June 26, 2010 and today is June 23, 2010, I'd want ...
Ok, so I have a form that is sending me arrays in the POST array. I am trying to read it like so:
$day = $this->input->post("days")[0];
This does not work. PHP says "unexpected '['". Why does this not work?
I fixed it by doing it this way:
$days = $this->input->post("days");
$day = $days[0];
I fixed my problem, I'm just curious...
I'm trying to figure out the best way to do the following:
If a user chooses a certain day, say June 21, 2010 we will repeat an event every 3rd monday of every month, but if they choose June 28, 2010 the event will repeat every last monday of every month. This is how google calendar does it, and I'm trying to repeat that functionality. ...
For example is something like this possible in PHP?
class foo
{
public $something;
}
$class_name = "foo";
$f = new $class_name;
...
Let's say I have an array, and I print it:
print_r($myArray);
Array
(
[post] => 333434kj
[test] => wOVvc
[tytytyty] => xyzsalasjf
)
This array gets assigned to a CURL Post:
curl_setopt($ch, CURLOPT_POSTFIELDS, "field1=".$f1."&field2=".$f2."&something=True");
Since "field1" is equal to "post" and $f...
I configured the external tool correctly. As soon as I start to run a test case I get this error:
Failed loading C:\PHP\5.2.13\ext\php_xdebug.dll
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP/5.2.13/ext\php_oci8.dll' - The specified module could not be found. in Unknown on line 0
PHP Warning: require_once(../../.....
In the code below I call a function (it happens to be a constructor) in which I have type hinting. When I run the code I get the following error:
Catchable fatal error: Argument 1 passed to Question::__construct() must be an instance of string, string given, called in run.php on line 3 and defined in question.php on line 15
From what...
Hi Everyone:
I am attempting to display HTML information in an attribute of a XML document. For example, I somehow want to accomplish the following:
Attributes:
id = "id"
HTML_Elements = {
<a href="./link.html">link</a>
}
(<something id='id' HTML_Elements='code'></something>)
I am wondering if there is some way to accomplish d...
I want to import really clean .txt files into Mysql with PHP. I've read that this is easy if you know the delimiter. but I don't.
In my case, the .txt files look like tables - ie: they're still structured like tables, not like a standard, jumbled CSV file.
Does this mean I don't have a delimited file? If so, any advice on how I mi...
I have a text area that users typically paste content from Microsoft Word into. I am using Tiny MCE for formatting. The problem is they string that gets pasted always has style definitions that are commented out. I need a way to strip this commented stuff out of the string.
Here is an example of the comments that get added:
<!-- /* Fon...
Why isn't this working? I'm trying to make a php user profile URL.
<?php
class Users extends Controller {
function Users() {
parent::Controller();
}
function index($id == null) {
if($id == null) {
redirect('/', 'refresh');
}
else {
$data['title'] = 'User Page';
$data['result'] = $this...
Hello guys. I know this one might be easy but I couldn't figure out.
I have a List control that retrieve multiply data from Mysql. When a use clicks the data on List, The datagrid will display the data and the product image will show.
I can see the multiply data shown in my dataGrid, but I don't know how to get the individual data show...
I'm parsing out an HTML table and building an array based on the row values. My problem is the associative keys that are returned have a bit of white space at the end of them giving me results like this:
Array ( [Count ] => 6 [Class ] => 30c [Description] => Conformation Model (Combined 30,57) )
So a line like this:
echo $myAr...
My code
mkdir("/some/absolute/path",0777);
and
mkdir("relative/path", 0777);
is not working, safe mode is turned off, and I've even tried setting all of the parent folders to 777.
Any ideas?
EDIT: I do have error reporting turned on, in my frustration I've 777'd the whole path just to make sure that, that isn't the issue. It's got...
I have a site written in PHP. It currently uses MySQL for all of its database needs (I'm open to additional DB technologies).
The system's content is interrelated. These relationships can be represented as a graph where vertices are pieces of content and edges are the relationships. I need to be able to traverse that graph. In particu...
I have made a joomla component that I want to put on SVN. The problem is that Joomla components have bits and pieces scattered all over the place. What is the best way to handle this with SVN considering I still want to be able to version the application, without including all the core joomla code website code?
UPDATE
I ended up usin...
I'm using an array to store the names of other arrays which are dynamically generated elsewhere. I need to loop through the "names" array and access the contents of the "named" arrays. Something like this:
$names = array("one", "two", "three");
$one = array("a", "b", "c");
$two = array("c", "d", "e");
$three = array("f", "g", "h");
fore...
I read that Symfony does not work well on a shared hosting environment, why is that? In the tutorial I read you had to edit Apache configuration but it seemed that only enabled the uses of the Symfony debugger.
...