I have a variable on the global scope that is named ${SYSTEM}, where SYSTEM is a defined constant. I've got a lot of classes with functions that need to have access to this variable and I'm finding it annoying declaring global ${SYSTEM}; every single time.
I tried declaring a class variable: public ${SYSTEM} = $GLOBALS[SYSTEM]; but this...
I'm using PHP and I've never really done anything with Javascript or JQuery or AJAX. I'm just wondering if there are any available solutions to accomplish the same effect of auto-completion that SO uses for entering tags.
There are plugins which can handle one word but I haven't seen any that handles multiple words.
Also, I hear JQuery...
As the title says, I'm having issues connecting to MSSQL from a PHP Script.
The setup:-
PHP is running on an Apache Linux Server.
Microsoft SQL Server 2008 is on an XP Machine.
I've got Remote Connections turned on in the MSSQL Server.
The database bggs does exist.
The database is running (I can see a green arrow).
I have no firewall ...
I need an example algorithm that will draw pixels one at a time on a grid based (x,y) system, and also color them based on an rbg value based on binary data that is provided in some form. I am looking for anything written in php or a php like language such as C, but that does not use any sort of library or graphics card api, as i am codi...
Hi friends,
How to screen scrape a particular website. I need to log in to a website and then scrape the inner information.
How could this be done?
Please guide me.
Duplicate: How to implement a web scraper in PHP?
...
I am using this line to obtain and save an image from a URL.
file_put_contents("./images/".$pk.".jpg", file_get_contents($PIC_URL))
I am unsure what the best way to deal with an error is. At the moment it is failing because there is no permission, which will be remedied shortly, but I would like it to be able to deal with situations w...
Static variable gotcha in php
I am from Java background and have switched to php for one project recently.
I have found one unexpected behaviour in php.
Value set to some static variable is
not staying persistent across the
requests.
I am not sure if this is the expected bahaviour. Because in java , you can always persist ver...
I need to keep a session alive for 30 minutes and then kill it.
...
One of the ncie things about PHP is that if you do an include/require it works off the directory where the file is (or rather the URI of the request). That means that if you want to include further file you don't need to know from where the original script is running. All you need to know is where the current script is.
Now I want to ...
I am trying to see if a URL exists or not, and if it does not exist reset the variable containing the URL to an error page/image. However my attempt below sets every instance of PIC_URL to noimage.gif, regardless of if it exists and is accessible or not. What am I missing?
if (@fopen($_REQUEST[$PIC_URL],"r"))
{
$status = "1";
}
else ...
Hi guys,
Like I said in the title, I was wondering whether it would be possible and how, to recursively parse an XML document and return all the nodes that have a given argument.
What I'm actually trying to do is to load and XHTML document and return all the nodes (P nodes, DIV nodes, etc.) that have a class equal to a previously defin...
This question pertains to Ruby on Rails and PHP. When looking for a VPS host for a web application (haven't decided which of the 2 languages to write it in yet), what should I take into consideration more? Memory or CPU? I know that you need a fair balance of both, but which wall will I run into first?
I'm sure it depends on the type o...
I saw that there is a virtual() function in PHP that will call a CGI script, but is that the best way? Can I pass any parameters to that scripts as well?
I saw some examples using file_get_contents() or include() and passing in the URL of a CGI script, but that feels like a hack.
...
Basically I'm a bit stuck,
I've been following the quick start on Zend site, and wish to make a dynamic navigation to the framework, I've got layout.phtml with $this->render('navigation.phtml); this has static links, but I wish to make them pull from a database table could someone in plain english not geekcaneeze explain the correct way...
Hey I have a question regarding the compatibility of ColdFusion and PHP.
We built a community website which is based on ColdFusion. Is it altogether possible to add features such as blogs, and other community features to our website in PHP?
I mean to combine both PHP and ColdFusion together.
Thanks very much for the help!
...
Hi,
I am trying to download the content of a secure (uses https) webpage using php and curl libraries.
However, reading failed and I get error 60: "SSL certificate problem, verify that the CA cert is OK."
also "Details: SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
So...pretty self explanatory error msg's.
My question is: H...
I Have a unique id generated for each record that i store into the database
i want to pass that id to php and run a select statement against that and get a value back from the database and pass it back to flash, what is the best possible way to do it?
ps am using AS3
...
Hi, I am writing an app that allows people to schedule things for certain times and then displays them. The time of the event is stored in the database as an sql TIME, because there are things im doing in the DB that need this structure.
However, on the output page i want the time to be in 12:00 am/pm format, but i dont want to run a c...
Hi,
I want to POST an URL using CURL and php.
There is a big form on webpage and I don't want to manually copy all the variables and put it in my POST request.
I am guessing there has to be a way to serialize the form automatically (using DOM or something) and then just change whatever values I need.
I could not google my way out of ...
<?php
$var = NULL;
var_dump(isset($var)); // bool(false)
var_dump(isset($unset_var)); // bool(false)
?>
isset($var) should return TRUE, since it has been set to NULL.
Is there any way to check for this?
Thanks!
...