Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~14.8K People Reached
Favorite Tags
Member Avatar for BigFormat

Hello, I've written down a small JS function 'checkForm()' to validate the input in a form and alerting, before actually sending data to the PHP server-side script. In my form, in addition to common input text fields I've got two buttons: the first called "ADD" to submit data and "CANCEL" …

Member Avatar for BigFormat
0
179
Member Avatar for BigFormat

Hi all, I'd like to filter an input string with a list of commas separated numeric ids to understand if it matches the pattern (only digits and commas allowed, i.e. "112,5,16,4578,ecc"). I'm trying to perform a regular expression match using preg_match. [code=PHP] $ids_list = '112,5,16,4578'; if (preg_match('/[0-9,]*/', $ids_list)) echo'OK!'; else …

Member Avatar for BigFormat
0
158
Member Avatar for BigFormat

Hi all, I would like to perform a conditional get of a file using PHP and cURL. How can I detect 304 code sent via HTTP headers and avoid to download the entire file?

Member Avatar for BigFormat
0
58
Member Avatar for mrcniceguy

I have a login script,which after a member login successfully session is registered. The problem is that if user dont use the page for a certain time from 30 minutes. session a getting lost,and member should login again. So what can i do to lengthen the session time,if its possible …

Member Avatar for somedude3488
0
133
Member Avatar for BigFormat

I'd like to redirect the user to another page, i.e. after a login check. I'm used to doing this via header location directive, it's all ok, but, if I'd like to print a message and redirect the user in 2/3 seconds, like on this forum when you login? Is it …

Member Avatar for BigFormat
0
5K
Member Avatar for BigFormat

I need to obtain current date formatted this way in PHP: Sun, 26 May 2005 19:32:54 GMT Is there a specific function or I've got to create it myself?

Member Avatar for ShawnCplus
0
56
Member Avatar for BigFormat

It's not a lot more than curiosity, which is the difference between <br> and <br /> ? I see both of them widely used and abused, are they completely interchangeable ?

Member Avatar for BigFormat
0
90
Member Avatar for nish123

[B]just a small query... how to get User's login time and logout time...??? as well as how to know whether particular user in Logged in out..?? Thnx[/B]

Member Avatar for Josh Connerty
0
3K
Member Avatar for BigFormat

Hello, I've got to find on a small lan (< 200 hosts) the host (or better one of the hosts) which has in its [I]registry[/I] a specific public name bound. My first idea was to write a loop in which for each potential host of the lan I perform a …

0
49
Member Avatar for BigFormat

I need to list the files in my current directory and have them packed into an array of chars, in Linux. I use system("ls > temp_file"); to write them one per row in a temp file, and then I copy from this file to my string. Is there a more …

Member Avatar for Salem
0
62
Member Avatar for BigFormat

Hello, I need to create some dirs (one for each user), taking the dir name from a given string. I managed to do this with the following code: [CODE=C] DIR *dir_ptr; char *target_dir; target_dir = malloc(32*sizeof(char)); for(all users) { /* Set username for current user */ target_dir[0] = '\0'; strcat(target_dir, …

Member Avatar for Salem
0
100
Member Avatar for BigFormat

Hello, I've to build a database of students in a certain school in which each student has a list of her/his passed exams along with the grade gotten. I have 3 structs and I need an advice on how to carry out memory allocation, eg. when I add a student. …

Member Avatar for Clockowl
0
3K
Member Avatar for p3_tib2001

Help! Now I study about NAT (Network Address Translator), it is a new way about translate IP local to public. Ok, the point is when I want to install NAT in LINUX, i got error messages like below. I think this is about coding in nat.h. What should I do …

Member Avatar for p3_tib2001
0
166
Member Avatar for BigFormat

I have to pass a string to a function that strcats something to it, in K&R I read to pass a pointer to it, but I don't know where to allocate buffer... Is there a difference betw passing an empty string or not? My printf starts with some strange symbols, …

Member Avatar for BigFormat
0
2K
Member Avatar for BigFormat

Hi all, I've done this prog to get the last token in a string es: /dir1/dir2/file.txt must return --> file.txt I get several errors on assignments, what's wrong with it? many thanks [CODE] int main() { char *path; char *filename; path = (char*) malloc(sizeof(char) * 64); strcpy(path, "/dir1/dir2/file.txt"); filename = …

Member Avatar for BigFormat
0
1K
Member Avatar for BigFormat

Hi guys, I've to read a txt file and produce a statistic of each alphabetic char occurrence. I'm approaching this task reading char by char until EOF and using an int array to hold the number of occurrences of each character read so far! So that's my solution: [code] int …

Member Avatar for Salem
0
428
Member Avatar for BigFormat

Hi guys, I've got troubles with a conversion. My function: void stringFormat (char *input, int nums) receives a string like this: "name;3,45,5,6,77;" and a number indicating how many numbers in the String (in this case 5) I've got to tokenize the string in order to obtain: 1) a string named …

Member Avatar for BigFormat
0
143
Member Avatar for BigFormat

Hi guys, congrats for this wonderful site, I've found it very helpful for my programmation skills, in more than one case.. Keep going this way :)

Member Avatar for jasimp
0
36