I can't figure out how to use CURL's FTP, specifically, how to issue FTP commands from my PHP code:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'ftp://ftp.microsoft.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTQUOTE,array('CWD bussys/','LIST')); /* ?!! */
echo '<hr>...
I have a non-computer related data logger, that collects data from the field. This data is stored as text files, and I manually lump the files together and organize them. The current format is through a csv file per year per logger. Each file is around 4,000,000 lines x 7 loggers x 5 years = a lot of data. some of the data is organized a...
Hi,
I'm currently working with an massive PHP codebase, witch is completely undocumented.
Here's the deal. All of the PHP code is included every page call. They build a simple include all kinda function that scan's the directory and includes all PHP files it can find. It works recursively for all the subfolders.
I would like to know w...
Hi, im looking into sessions a bit more and would like some input.
on a simple login form once the form is submited i have the following
.
..
...
session_name('TOKEN');
session_set_cookie_params( time() + 600, './', 'example.co.uk', false, false);
session_start();
$_SESSION['TOKEN'] = TOKEN;
...
..
.
and then when a request to the s...
Hi Guys,
I am trying to create a little php script that can make my life a bit easier.
Basically, I am going to have 21 text fields on a page where I am going to input 20 different numbers. In the last field I will enter a number let's call it the TOTAL AMOUNT. All I want the script to do is to point out which numbers from the 20 fields...
Hi!
I wish to set some properties in MyFilter with constructor injection but it seems impossible with Zend_View::addFilter(string $filter_class_name) since it loads a new instance upon usage. MyFilter implements Zend_Filter_Interface.
Can I somehow inject an instance of a filter to an instance of Zend_View?
Closing since it (hopefully...
Im not sure how to output MySQL data into formats below. (eg: timelist, usersex, userage from table users.)
<script type="text/javascript">
timeList = new Array(),
userSex = new Array('female','male','male'),
userAge = new Array('21','36'),
userMid = new Array('liuple','anhu');
</script>
Thanks!
...
I am having an issue removing "%3Cbr+%2F%3E" from my string using the preg_replace function. My assumption is that the '+' char is being interpreted incorrectly. Here my code:
$address = preg_replace('/%3Cbr+%2F%3E/', '', urlencode($address));
Thanks as always!
...
Hey all,
So I have this php web app, and one of my folder contains some files that can be downloaded.
I have a download script that modifies the headers, in order to always offer a download link. (instead of showing a picture for example, when you click on a link, a download box pops out)
Right now, if you enter a url like: http://www...
I have a very large php maintenance script (basically it recreates thumbnails for an internal archive), it takes 10 to 20 minutes to complete and I noticed that php only displays "echos" when the whole script has finished parsing. Is there any way to show messages like:
Phase 1 - Complete
Phase 2 - Complete
Phase n - Complete
While th...
Hi,
As part of one our system's we enable a user in the backoffice to add a block of 301 redirects should they need to. This is just a textarea which then populates a specific area of a .htaccess file. As much as this may seem insecure it has only previously used internally by people who know what they are doing but for various reasons ...
Good morning.
I would like to know how do I add kilometers to a map point (latitude / longitude).
For example: The city Jaraguá do Sul is in latitude -26.462049, longitude -49.059448. I want to add 100 kilometers up, down, and on the sides. I want to do a square and get the new points.
How do I do that?
I tried it:
<?php
$distance =...
Hello!
I am making a table of DJ mixes in WordPress and using the duplicate group / custom field functionality of magicfields (a fork of the flutter plugin) to 'CMS-i-size' the process of adding a new mix to the table.
The order of the mixes matters: I need to put the first mix in the section, the rest in the section.
Right now I am...
Does anyone know how to set the values for a pie chart in the Open Flash Chart 2??
i have like a percentage for a visitors sources, and i don't know how to display them , because they changed a lot of stuff in the v2
http://teethgrinder.co.uk/open-flash-chart-2/tutorial-4.php
what i have now in the data generating is this (from the ex...
I have a form on a page that sends data to php file via ajax request. The data is then collected into a single variable and sent to email specified in the php file. The data is in slovenian an uses a lot of letters that use diacritics (š,ć,ž). Everything works fine when the form is submitted from any browser that isn't Internet Explorer,...
If I'm going to learn programming first time, How i should start?
I don't know programming yet but I'm good at XHTML and CSS. my main aim is to learn first Javascript than second PHP. after having good command in Javascript I'll move to PHP.
all these i want to learn to get good command in all areas of Wordpress design and Development...
How could i get two records in one iteration of foreach loop using smarty?
OR should i use section?
...
As we have CPU restrictions on the server. And what about PHP's readfile function?
...
I have an array and a variable, I want to check if any of the array items occur in the variable. I presume I somehow use strstr()?
Example:
$bad = array('google.com', 'facebook.com', 'myspace.com');
$ref = $_SERVER['HTTP_REFERER'];
if(ANY OF $bad IS IN $ref) {
...
}
...
Okay, here's my current code for an array.
$sites[0]['url'] = "http://example0.com;
$sites[1]['url'] = "http://example1.com;
$sites[2]['url'] = "http://example2.com;
$sites[3]['url'] = "http://example3.com;
$sites[4]['url'] = "http://example4.com;
What I want to do is perhaps make a php page with something like
$s...