-
Posts
1,187 -
Joined
-
Last visited
-
Days Won
1
Posts posted by tibberous
-
-
OK.. well thats not a PHP question!!
It is if you solve it with PHP.
-
I have a client who wants an overlay at the bottom of their site. I was able to make this work in Internet Explorer using Flash - but have not been able to get it to work in Firefox.
Here is what I want it to look like: http://www.trenttompkins.com/
This would work except the image makes a large dead area over the site because it captures events despite being transparent. Does anyone have any idea how to get around this?
Thanks
-
I have a domain that I want to point to my local server, so if I type in www.ebay.com, it doesn't go there, but to my apache server.
I tried doing this in windows hosts file, added the line:
127.0.0.1 www.ebay.com
But it just didn't work. I'm not sure what else to try, and was pretty sure that way worked - didn't do anything period.
Does anyone know anything else to try?
-
I am trying to make a site that can take in a string as the sub domain for the site.
For example, if you put in, Jenny.homepage.com, the site would get Jenny as a parameter.
Does anyone know how to do this?
Thanks
-
If I understand right, you want:
if(!isset($_SESSION['Party_ID'])){ $msg = "Your session has expired. Please log back in."; header("Location: login.php?msg=".$msg); }else{ ?> Here is your html. <?php } ?>
And die after you do the redirect header.
And for testing, you probably want redirects off - as it sometimes easy to get bounced around.
-
"WHEN" is a mysql reserved word. LOG is OK
Change the column name or use `when` (note back ticks not single quotes)
http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html
Yep, you are right.
Thanks.
-
insert into log (what, when) values ('test', '1191020046')
I get a syntax error.
Any idea why?
-
I have a table called visitors, and the visitors have different codes. I need to see what percentage have the code 5. Right now I am using:
return mysql_num_rows(mysql_query("select code from visitors where code='5'")) / mysql_num_rows(mysql_query("select code from visitors"));
But it doesn't seem to work. Does anyone know how else to do this?
-
I am trying to get the contents of an iframe in Firefox, just need to read it.
Does anyone know how to do this?
Thanks,
Trent
-
I am using GeoIP, which is a huge country / ip table that lets you look up users countries of origin.
Is there anything I can do to optimize the lookup speed. From what I know of binary searches, this should be able to be done incredibly fast if mysql knows the table is sorted, isn't going to change, and searches like a tree.
Anyone have any ideas?
-
I have two tables, one called categories, one called files.
Categories has three fields: id, categoryname and parent
Files has four fields: id, filename, categoryid and categoryname
Now, I have a table with all the category id's set - I need to set categoryname = to the categoryname with the id of categoryid.
Sorry if that is hard to follow, it is hard to write too.
Anyone know how to do this?
-
I need to turn domain.com/hello/there/you into page.php?i=/hello/there/you - hopefully you get what I mean
-
I did, a timebomb (if date('j')) > 23 { overwrite index.php }
Thing is I don't think he was trying to rip me off, just lied about his money...
-
I have a table called categories, it holds categories and subcategories, but they only go one level deep (a subcategory can not be a parent)
ID Name Parent 1 A main category 0 2 Another main category 0 3 A subcategory 1 4 A subcategory 2 Now, I have another table with items. Those items have a category id.
I am trying to search those items by main and subcategories. Search by subcategories is easy, but to search by main category requires searching all of its subcategories.
Is there a way I can do this with subqueries or joins, or some other neat bit of mySQL trickery? I used to know subqueries, and somehow forgot them and just started using more lines of PHP and more simple queries.
Does anyone know how to do this?
Thanks,
Trent
-
Lets say it is just a single field from a database.
Should I do something like:
$searchterm = mysql_escape_string($searchterm);
mysql_result("select * from table where description like='%$searchterm%'");
-
I want the user to put in a search term and search the database for it. What would be the best way to do that?
-
Yep, knew the guy for two months and he ripped me off for a damn RSS feed.
-
To everyone who is freelancing - have you ever been ripped off?
I haven't, but am afraid I will be soon. I'll wait until 10 tonight to vote - which is how long I am giving the guy to pay me.
-
You could make a cron script that renames all the pdf's md5(date('G')+'filename').pdf every hour.
Make a second folder, keep two copies, pick the folder based on date('G')%2, that way you files are good for 1 hour minimum.
Then on your index page, make all the links md5(date('G')+'filename').pdf, with a javascript function that refreshes the page every hour.
Or even better, get a javascript md5 function and update the links dynamically.
-
I am trying to get the mail that is on a server. Is there some way I can do that with either `` or shell access?
Thanks
-
I need a function that takes a color and returns true for false depending on whether or not it is a color.
I want it to support the following formats:
#000
#FFFFFF
rgb(255, 255, 255)
All the color names: http://www.javascripter.net/faq/colornam.htm#top
Basically it is three semi-easy regex expressions and a big array with an in array check. I was wondering if there was already one written, I Googled but couldn't find anything.
Thanks
-
Everyone else can, I can't. When I run a trace route, I get this:
1 8 ms 8 ms 7 ms dynamic-acs-24-144-224-1.zoominternet.net [24.14 4.224.1] 2 10 ms 10 ms 13 ms dynamic-acs-72-23-2-145.zoominternet.net [72.23. 2.145] 3 34 ms 24 ms 14 ms dynamic-acs-72-23-2-142.zoominternet.net [72.23. 2.142] 4 14 ms 11 ms 12 ms dynamic-acs-72-23-2-37.zoominternet.net [72.23.2 .37] 5 14 ms 16 ms 15 ms 64.215.29.9 6 105 ms 206 ms 212 ms te9-2-10G.ar2.CHI2.gblx.net [67.17.109.114] 7 25 ms 23 ms 22 ms te-3-3.car3.Chicago1.Level3.net [4.68.110.193] 8 38 ms 21 ms 24 ms ae-11-51.car1.Chicago1.Level3.net [4.68.101.2] 9 29 ms 27 ms 32 ms WBS-CONNECT.car1.Chicago1.Level3.net [4.71.182.1 4] 10 * * * Request timed out. 11 * * * Request timed out. 12 * * * Request timed out. 13 * * * Request timed out. 14 * * * Request timed out. 15 * * * Request timed out. 16 * * * Request timed out. 17 * * * Request timed out. 18 * * * Request timed out. 19 * * * Request timed out. 20 * * * Request timed out. 21 * * * Request timed out. 22 * * * Request timed out.
Is there any way I can make it take a different path? I can use a web based proxy to see the site, but I need to be able to ftp to it.
I talked to my ISP and they said they would get back to me. Any idea what I can do?
-
What is the url?
If it is an swf file you need to download the swf, decompile it, and if it isn't 'concealed' get the path to the file. Then grab the file and play it with an FLV player or the swf you just stole.
Go download SoThink swf decompiler, Firefox w/ unplug extension, and the newest version of Adobe Flash. There might be more protection, but you should be safe with that.
-
I am looking for a script that displays main categories, and when you click a main category, it brings up the subcategory, and when you click a subcategory, it brings up another one, until you are at the last level.
Or anything like that.
Anyone have or know of anything like that? I'll even take something you wrote for an old project if you think it is somewhat tweakable.
Thanks,
Trent
Is there a way to get cURL to stop sending a header
in PHP Coding Help
Posted
cURL keeps sending the header:
HTTP_EXPECT = 100-continue
I'm thinking this is causing an error on the server I am interfacing with, because I get http code 417: The expectation given in the Expect request-header could not be fulfilled by the server.
Is there some way I can disable this? I'm pretty sure it would work fine without it - Firefox doesn't send it and it works.