Hello
I am configuring a pre-made script from php-login-script.com, and so far, so good, except...
A php script opens and closes <?php ... ?>, then inserts plain html without using "echo" or "print".
Then it calls php values within an html form like this:
<textarea name="address" cols="40"...
Hello
I have been using Net::FTP in a script to backup server data with a cron run at night. It was working, then I bumped my head and ran out of allocated space on the backup server. I contracted for additional space but it *seems* like the process *may* still be hanging..... that is...
Hello
I have been writing searchable directories for years, and generally I have used a form that has a dropdown/select field for states, including an option for "all states", and a separate text field for city. The raw data being searched is always broken down into separate city and state...
Hello
I am using a form to search by zip code. If the visitor does not enter a 5-digit zip code, an alert is generated. So far, so good. Search works, alert works.
However if it returns false, when the OK is clicked on the alert, the form submits anyway. I am seeking a method that will...
Hello
I am in the process of migrating domain accounts from one linux server to another, and it has a different php version setup in a different location.
I had been getting a number of include_path errors, and this is the syntax for php.ini that seems to be working, allowing me to include...
Hello
I am seeking suggestions to reduce cpu and memory usage for a couple of code snippets. I have been adding @ because of a large number of undefined variable notices. However I am coming to realize that this is expensive on a busy server.
The first is for an incoming variable:
$state =...
I am looking for architecture suggestions. I have many different domains that use php to include an api call to a third party server. The results are xml and I use simplexml to parse the results.
Generally the third party api is very good. Sometimes, however, it is slow and causes pages not...
Hi
I use php includes all the time, and I'm looking for a way to do something that **may** not be possible.
Often I include a file using the server path:
include ('path/file.php');
If I have identified variables in the parent script, they are passed to the included script, and the included...
Hi
I am stumped with a script that works quite well to display data from an oracle db using oci_connect, oci_parse and oci_fetch.
When the script does not find a result matching the query parameters, I want to send a header 400 not found message.
I have tried lots of tests and I can't get it...
Hi
This may not be the forum for cookies, but a search brought up several different forums, so since it is written in php here is my question:
if ($catid != "index") {
$oldCookieValue = $_COOKIE[$catid];
if ($oldCookieValue == "") {$oldCookieValue = 0;}
$cookieValue = $oldCookieValue + 1...
Hi
This may not be strictly a php question, but the site is primarily in php. I display jobs from simplyhired and items from ebay partner network. The php scripts that grab the 2 xml feeds are basically the same, using SimpleXML to interpret the raw xml and display the child elements.
The...
Hi
I have a list of cities over 6,000 population in the U.S., for example in California there are 549 cities in the list.
I wrote a script that grabs an xml file and outputs rss 2.0, and I want to plug in a different city name each time the script is run. The script will be run every 1/2...
This question may be more browser-related, however here it is:
Why do firefox and opera continue to use more and more memory as they remain open longer periods of time?
I can understand how browsers would use more memory with more tabs open, but a firefox browser with 2 open tabs might keep...
Hello
I have a form that is displayed within an iframe, named "contribute". The form is a php page, "form.php".
The first field in the form is a drop-down select field. I want to use onSelect (I *think*) to reload the php page within the iframe, passing the value of the selected option to...
Hi
I am working with php5 simplexml to grab feeds from the simplyhired job posting affiliate program.
The script grabs the xml feed with this string:
$pFile = new SimpleXMLElement('url-with-variables', null, true);
It works very well and generally the response from the xml server is fast...
I have been trying to understand the logic of included files in php.
I have these files:
index.php
inc/footer.php
inc/navbar.php
inc/toplinks.php
index.php sez:
include ('inc/footer.php');
footer.php sez:
include ('navbar.php');
include ('inc/toplinks.php');
The navbar.php file loads...
Hi
I have 2 regex codes:
This works:
perl -e "s/\&\#39\;/\'/g" -p -i file.txt
This does not work:
perl -e "s/\&\#39\;/\'/g" -pi file.txt
The only difference is the -pi versus -p -i.
The -pi version seems to work for other substitutions, just not this one. The only difference there is...
I am looking for a way to identify mysql row fields in perl, similar to php. With the following perl code, when I modify it for another table with different fields, I have to re-count the fields. With the php, I just have to comment out unused fields or add new ones, because they are...
I am editing a perl module to parse data that has some variations:
Example 1
<div class="text">32779 Kudo Dr<br>Mission, BC V2V 6T5<br>(604) 826-9091</div>
Example 2
<div class="text">Surrey, BC<br>(604) 951-3777</div>
The second example does not have an address or the following <br>.
This...
I have 2 scripts
The first one works fine with google.com (gets the text anyway) but does not grab anything from switchboard.com.
$GrabURL = "http://www.DOMAIN.com"; //- Complete URL Of The Page You're Grabbing From!
$GrabStart = "<html>"; //- HTML Code To Start Grab. Must Be A Unique Bit...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.