-
Help Needed
Date: 04/14/05
(PHP Development) Keywords: php, programming
Hi,
I am quite new to this community. I just started programming in PHP and got interest. I felt free to join this community.
I need some help for writing code in PHP...
I want to write a code to generate thumbnails of all pictures in a directory. My server supports PHP 4.3, but i don't know whether my server supports GD or not.
Without using GD is it possible to write such a code? if yes, then how?
Please help me out....
Thanx everyone
Source: http://www.livejournal.com/community/php_dev/54054.html
-
get file from remote site (sorta)..
Date: 04/15/05
(PHP Community) Keywords: php, security
Hey everybody..
I've got kind of a weird problem, so let me explain what I'm trying to do before I get into code snippets.
I am working on a project where I want to do some kind of update notification when a user uses a "check for updates" type link. Each file in the script has a variable with a rev number. Ideally, I would like it to hit a script on MY site that has a "master" list of rev numbers. When I update one of the files, I put it up on the server and update the rev number in the master list. Ultimately (I have not gotten this far yet), the script will compare rev numbers from the manifest on the client side against the master list and then offer the new rev scripts as .txt file as downloads. I don't want it to automatically replace or download these files to the server directly for security reasons.
So far, my update script parses these files and gets the rev number on the client side without any problem. What I'm having problems with is actually getting the script to obtain and parse the master list from my site to compare with the generated manifest on the client side.
So far, I've thought about using file() to load the rev numbers into arrays, but if I do that, it'll be a HUGE pain to update the master file list with new rev numbers. Ideally, I'd like to have it include() a .php file on the other end that will read variables, then it would be a simple if between the $master_file_name (from my server) and the $client_file_name variables (from the client server). What I really don't want to do is do this via FTP unless I have to. I have to keep security in mind and it's bad enough I'm coding a script to try to snag stuff from a remote server, I really don't want to get ftp or a http download involved.
If I use file() (and use a text file rather than a php file), I could probably use str_replace() to cut out the variables on the client side, the only problem is the function I would need to write would likely be huge as the variables on the "master" list are all different. I also thought about doing this on the master/server side by writing some kind of "export" script or backend that will generate the file from the master.php file..include() won't work as my server parses it before sending it off.
Anyone got any hints as to what I need to do or a better way to do this?
Source: http://www.livejournal.com/community/php/285733.html
-
Webhosting
Date: 04/15/05
(PHP Community) Keywords: php, mysql, sql, web
Anyone know any good cheap webhosts for the uk?
With features like PHP and MySQL included in the package of course.
Source: http://www.livejournal.com/community/php/286063.html
-
Getting remote script results in PHP
Date: 04/15/05
(Web Development) Keywords: php, html, xml
Calling all PHP gurus: I'm trying to use fopen() to get the XML results of a remote script, using the URL with all the script parameters instead of a file name, but all I get back is the default HTML from the script, instead of the XML results, as if I hadn't passed it any parameters at all. I'm assuming this has something to do with the HTTP headers fopen() uses to get at remote files, i.e. it bypasses script execution on the remote server and downloads the file directly. Is there any way I can get around this with fopen() or do I really have to much with HTTP headers and use fsockopen() or something?
Any help will be greatly appreciated.
Source: http://www.livejournal.com/community/webdev/189477.html
-
Hosting Options
Date: 04/16/05
(PHP Community) Keywords: php, mysql, sql, web, linux, hosting, apache
I am currently hosting my web site with powweb, the problem is that I am outgrowing its feature set. I’m working on some applications that need the MySQL InnoDB table type, or at least would find it very useful. Does anyone know of a hosting provider that supports the following:
PHP 5.0x
MySQL 4.1.x With InnoDB
Apache (1.3 or 2.0 would be fine)
Ideally running linux or BSD
Source: http://www.livejournal.com/community/php/286793.html
-
Subnixus.com - 3 easy ways to earn free domain hosting.
Date: 04/18/05
(Web Hosts) Keywords: php, mysql, database, sql, hosting
www.subnixus.com now has three easy ways to earn free hosting.
1. Being an active member of the forum. It's that simple, by posting on our forum you can earn free hosting. Read about it here: http://www.subnixus.com/forums/viewtopic.php?id=798
2. By signing up for one of our sponsers, such as DISH Network, you can earn one year of free hosting. Read about it here: http://www.subnixus.com/forums/viewtopic.php?id=799
3. By making a donation of $10 or more you will earn one year of free hosting. Read about that promotion here: http://www.subnixus.com/forums/viewtopic.php?id=802
Your hosting package will be reviewed and given on a case by case basis. The minimum package includes (but you could qualify for more):
www.yourname.com
125MB of Space
1G of bandwidth
1 MySQL Database
POP Email
Control Panel
FTP
(basically anything you need to get your site up and running)
This new program starts this week. All accounts that are earned between April 18 - 22 will be setup on Sat. the 23rd. Please visit www.subnixus.com for all of the details.
Source: http://www.livejournal.com/community/webhosts/26063.html
-
CMS
Date: 04/18/05
(Web Development) Keywords: cms, php, blogging, css, html, web
I run a mixed content website with a couple of my friends. One of those friends knows html and some basic php. I know html and some basic php and some css. The third friend knows nothing.
I'm looking for a CMS that we can use to update our site.
www.thisisjerkass.com
That's our site, as you can see we have articles, videos, etc. I'm just looking for a way to make posts on the front page a lot easier. As of now, I have to edit four files just to put it up there and archive it. I can't use just a regular blogging cms because the format of the site isn't exactly a blog. Anyone have any suggestions?
Source: http://www.livejournal.com/community/webdev/189709.html
-
Need Some Acrobat Help...
Date: 04/19/05
(Web Development) Keywords: php, web
Okay, all you Acrobat people....
I'm having a bit of trouble figuring something out.
A client wants a basic PDF form that clients can download, fill out, and have results e-mailed to him. (Note: He does not have Acrobat.)
Supposedly, this is a simple task, but I'm not getting something right, apparently.
I'm familiar enough with Acrobat (I have Acrobat 7), but after checking out the Acrobat Bible, I didn't find that much information on how to get a form to submit properly via e-mail if the submitee does not have Acrobat. I've tried pretty much everything logical that I can figure out, but can't get the form to submit properly.
At first, I routed the Submit action to a php formmail script that did send an e-mail to the desired recipient (albeit a blank one)....
Is there anything else I can do, or does the client simply have to have Acrobat installed in order to import/view submitted form data?
Any help is much appreciated...I hope I'm being clear enough. bah.
Thanks!!!
note: x-posted to -- design -- webdev --
kthx.
Source: http://www.livejournal.com/community/webdev/189979.html
-
Just looking for some general suggestions/advice/explanations.
Date: 04/19/05
(PHP Community) Keywords: php, programming
Hey all,
So I guess I'd consider myself a junior PHP user at this point, and I want to get to the next level - aka really knowing what the fuck is going on and what the common concepts etc are in PHP. One thing I've pondered installing for a site that I'm making for a client is a content management system - though I've never installed one before, or used one, unless I'm just not familiar with the concept. Can anyone help explain what these do, and/or point me to an example of a few? Like an example where I could test-drive it myself and then learn about installing it after or something.
Also, if anyone has any suggestions for books, I'd like to know how you all got so sharp - I naively assume that you sharp ones are just intense into programming and have a good OOP background, but I'd like to know what methods are good.
Thanks!
Source: http://www.livejournal.com/community/php/287964.html
-
Strip a period at the end of a line...
Date: 04/19/05
(PHP Community) Keywords: php, mysql, database, sql
Greetings... Semi-novie with PHP here. Toyed with it years ago, and just started working on a project that is based in PHP. I'm getting some information from a MySQL database, and I've used str_replace to modify most of what I need, but I'm pulling a domain name from a sentence, so what string_replace leaves me with is 'domain.name.com.'
I'm trying to get rid of the trailing period, and I've tried using:
$text="domain.name.com.";
$newtext=rtrim($text, '.');
The . does not go away. I've tried with double quotes as well.
Any help would be most graciously appreciated!
EDIT: Got it... thanks for all your help!
Source: http://www.livejournal.com/community/php/288213.html
-
CGI
Date: 04/20/05
(PHP Community) Keywords: php, mysql, browser, html, database, sql
Hi all,
I have a program that gets its images from a mysql database. I pass a string to the program that gets the picture inside an HTML image tag like this:
<*img src=\"show_image.php/thumbnails/$boxData[thum_id]/img.jpg\">
This is what the string looks like when it has been passed:
show_image.php/thumbnails/7678/img.jpg
This is the program show_image.php
$pic_id = get_pic_id($_SERVER['REQUEST_URI']);
$table_name = get_table_name($_SERVER['REQUEST_URI']);
$file_data = get_file_data($pic_id, $table_name);
header("Content-type: " . $file_data['type']);
echo $file_data['binary_data'];
The functions get_pic_id() and get_table_name() run a regex on the string and return the correct portions of the string that I then pass to get_file_data() and get the binary data.
I used to get the pic_id and the table_name from the $_GET string, but I wanted to force the browser to cache the images so a friend suggested using this. Thing is he wrote his version in Python which I dont know.
My question to you all is do you know if this possible and if so where can I get the string from?
Source: http://www.livejournal.com/community/php/288307.html
-
Why Hello...
Date: 04/20/05
(Javascript Community) Keywords: php, xml
My first post to the community, and definately not my last!
So I'm trying to get XMLHttpRequest working, and it appears that the 'onreadystatechange' event is not firing. Does anyone know of a way to find out why? The file I'm hitting is PHP and simply returns a bunch of text delimited by '\r\n'. Any help would be greatly appreciated.
Source: http://www.livejournal.com/community/javascript/63612.html
-
going nuts
Date: 04/21/05
(PHP Community) Keywords: php
(gah) I inherited a site and well its a pain in the but.
This page:
http://gateway.rossoptical.com/php/product-beamsplitters_cube_detail.php?s_sort=beamsplitterscube.partnumber&s_item=beamsplitterscube.partnumber&s_word=
needs to take the selected checkboxes value (via post right now) and dump it into another form.
and on the other form this code does not work!
$partnumber = $_GET['ReqInfo'];
echo "Partnumber = ","$partnumber";
weeee!
I can make the first page use link as the method and get a url like this:
http://gateway.rossoptical.com/php/req.php?B-CHC013=ReqInfo&REQINFO=Request+Info
the value of ReqInfo is what I want.
when I find the person who did this previously (not IF) I am going to pummel them something harsh.
so I am loosing my mind, any ideas?
Source: http://www.livejournal.com/community/php/288898.html
-
PHP Webserver
Date: 04/22/05
(Computer Geeks) Keywords: php, mysql, sql, web
you guys know of a program that can emulate a webserver where I can test PHP scripts and also has mysql? Thanks.
Source: http://www.livejournal.com/community/computergeeks/666412.html
-
Another php question (sorry)
Date: 04/22/05
(PHP Community) Keywords: php
This all worked back on my old server, so now I'm having to redo a lot of stuff to make it work on a real host.
Alright, so I have my gallery script resize pictures to a size that viewers find comfortable. However, if the picture is over a certain size (about 4500KB uncompressed (as in, in memory)) I get a generic "internal server error" and I'm thinking they probably limit the amount of memory a script can use to around that number. However, I'm not sure. Is there a way (like turning on some kind of logging or doing a test in a php script) to see what exactly is preventing from working on images over this size. And if it is memory limitations, I'm guessing there's nothing I can do about it but have smaller images?
Source: http://www.livejournal.com/community/php/289537.html
-
Dreamweaver Template Error
Date: 04/22/05
(WebDesign) Keywords: php, programming, web
Hey guys. Newbie here. I've run into a little problem that's baffling me and I'm hoping someone would have some advice.
I've been maintaining and updating the company I work for's website for more than a year now(It wasn't created by me). It's quite heavy with PHP programming. Anyway, the link section, which appears at the top of every page of the site, is a template. The other day, I wanted to add a new link into the template(as I've done many times before). When I saved it, and it updated the template across all the pages, it gave me the following error on the index.php(the main) page:
"There is an error at line 47, column 29(absolute position 2040) of "C:\Website Name\index.php": Duplicate editable regions of name "head"."
I'm really stumped by this, because firstly I didn't make any changes to index.php, secondly I didn't add another editable region to it either, and thirdly, the only coding at line 47 of the index page is "!-- InstanceEndEditable --, between tags. I also can't get rid of the extra editable region, because it shows up as grey, locked coding on the index.php page, and it does not show up in the coding of the template page at all.
Any help/advice would really be appreciated.
Source: http://www.livejournal.com/community/webdesign/861656.html
-
Rename() question
Date: 04/22/05
(PHP Community) Keywords: php
I read what little there is at php.net on this function and a few other places, but I couldn't find the answer. If I rename a directory using rename(), do I also need to rename all the files in that directory? I assume not, but we all know that that assuming does. ;)
Source: http://www.livejournal.com/community/php/289946.html
-
PHP development practices from a Java Architects eye
Date: 04/22/05
(Java Web) Keywords: php
I had to do some hardcore PHP development recently. I got a new perspective on PHP during this time. This post is a summarization of my understanding.
In this article I will be making few generalizations. Each of them can a topic by itself, if described in full.
If you want to know more about any [...]
Source: http://blog.taragana.com/index.php/archive/php-development-from-java-architects-eye/
-
PLEASE HELP!!!
Date: 04/23/05
(Computer Help) Keywords: php, software, browser, web, google
I have a few computer problems. If you can’t help me with all of them, that’s understandable. If you could just answer any of the questions, I’d really appreciate it.
1) Tweak will let me set special folders but warns me about moving them. I'm assuming that this is really just a standard warning as I've moved the folders a few days ago and they all seem pretty harmless. (Including the Start Menu which I previously asked here and had a round robin suggestion. Anyways) Is it mostly harmless re-setting folder locations using programs like Tweak and/or TuneUP Utilities?
2) I need to remove something off of "File" menu when you open a folder. It's driving me nuts. Well, I wouldn't mind if I could re-set the hot alt key. Does anyone know a program that controls what items appear on a folder’s File menu? Does anyone know a program that allows you to set “alt” letters?
3) On Tuesday I downloaded Itunes. Ever since, the mp3s on my winamp playlist have gotten quieter and I don't know why that is. The wma’s play at normal volume on winamp but I have to turn up the volume way up to listen to any mp3. (almost like a throwback to my 2003 speaker problem.) As my playlist is a mix of both, I find myself constantly adjusing the songs. Does anyone know of software that checks what went wrong? I’ve already been in control panel sound and even system; all the drivers check out.
4)
a - I guess it goes without asking that if I have an old win 95 deluxe edition of Norton, there's no way I could successfully install it and get live update to work, right? I'll just have to purchase a new version, right?
b - so, in saying that, what version of Norton includes crash guard and first aid. I love first aid. I've never had to do it but I love the idea checking everyday system functions.
5) Start menu is driving me nucking futs. It keeps hiding programs i haven't used. i hate hate hate this. so i believe i turned this function off yesterday. I thought it was TuneUp but I guess not. How can I turn this function off.
6) Tweak doesn't work when trying to prevent IE from stealing focus. I asked this question last month when i was still using win 98. I knew I'd be upgrading soon so I didn't fuss when the advice didn't do anything to help. Now I'm using win mx, i've installed tweak and yet again, it does nothing to prevent IE from stealing focus. Can anyone recommend another program that can help?
7)
a - Internet Explorer has gone weird. I can't load lj userinfo pages correctly on the 3rd or 4th attempt. example, i open ie on my userinfo page and it loads properly. So whenever I say "new window" by doing ctrl n, instead of getting the "journal" menus at the top, i get < ************ > with the menus at the bottom. If i'm at download.com and i'm looking at my search results, i'll click on "by user rating". if at any point during this specific action i hit alt + tab to switch screens, ie crashes. no joke. so i have to sit and wait patiently while my slow 28kb connection loads that page. Has anyone else using XP experienced a similar problem? Is there an older version of IE that you think is better?
b - In addition, IE will sometimes automatically open a new window directing to a non-existing website: http://www.turbotones.net/uk/index.php . I will have hit ctrl + n ONCE (i don't do things twice) and my google search will have opened in a new window (whatever I was previously searching). After a few seconds, that page will open. I've searched all text in all files "word or phrase in the file" for "turbotones" to see who on my pc is asking to pop up to this page and this yielded no results. Can anyone help?
NOTE Please don't give me advice like "don't use IE" because that's not advice; that's just annoying. It's like saying "you shouldn't use automatic, you should use a stick shift" (or vice versa). Each browser has its own quirks and I've already gotten used to IE. In addition, I use IE at work, therefore I can mirror whatever I'm doing at work with what I'm doing at home.
8) I want to remove "Local Area Network" from the system tray. There used to be a great program. I think it was simply sys_tray manager from a few years back. Does anyone have a copy? I also want to get rid of quicktime. I've uninstalled it but it's still lurking about. It's also in my system tray and it's annoying! Can anyone recommend a good, fast, free system tray manager program?
9) Speaking of annoying, XP has reset the Page down/page up function to skip down/up "x" lines when using a drop down menu. I want to reset this figure. Does anyone know how?
10) I have an old excel spreadsheet that i've opened. I've already said that the columns should be mm.dd.yy. for whatever reason (well, i'm based in the uk now not the us) excel has decided that despite my previously setting the column properties, it should be dd.mm.yy (the uk format) What other automatic changes should I look forward to (gulp) ? btw, language changes (example, us to uk) are easy to find in word. does anyone know where I can find it in excel?
11) The last problem is quite generic. I have a few USB ports in the back that are working fine, but the ones in the front are fucked. I found under system, there's "code 28" error. I've searched for the drivers online but they are all no good. Initially when putting this PC together last Sat, it said something like "service pack #" with a link. Fair enough, I though. I didn't have a modem on me then so I couldn't connect my pc to the link. I just assumed that I'd get the link again. Well, I just made an ass out of me and me because lo and behold, I'm here trying to install the driver for the umpteeth time. Doesn't make a difference to me personally cause I have four in the back in working condition. The ports came with the tower and I don’t have a disk for the tower. Now I'm hoping someone out there has a link to driver installation file.
I was hoping this would help. But I guess not.
12) I have to keep an eye on my hard drive temperature. I have 3 fans so hopefully it'll always be all good, but if not, what's a bad temp? currently, it's at 33.
Thanking you all in advance. Please let me know if you need further information!!!
cross posted to ladiorange, computer_help and livejournal_uk.
Source: http://www.livejournal.com/community/computer_help/381463.html
-
Suggestions?
Date: 04/23/05
(Web Hosts) Keywords: php, mysql, sql, web, hosting
I manage two domains, each under 10MB. For the past two years, they've been hosted with dr2.net, but then service got spotty and then they merged with Mesopia and the reviews got worse.
So, I'm looking to switch both domains to a new shared host. After checking out webhostingjury.com, I like the features of the standard plan of u-hs.com but the price seems a tad too steep. Looking for something in the area of $10 to $25 a year. One of the domains I expect to migrate to PHP and MySQL in the next few months.
Suggestions?
Source: http://www.livejournal.com/community/webhosts/26292.html