GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need some php/etc work done ? Ill do it for free. (https://gfy.com/showthread.php?t=852667)

Bro Media - BANNED FOR LIFE 09-04-2008 05:24 PM

Quote:

Originally Posted by pussyserver (Post 14710036)
thank you ok heres the situation

the form receving the user input is a php form on one domain and I want to pipe the inputed data to a form located on another domain so it would appear as if the form data was posted directly at the remote domain

thanks in advance

could use javascript (ajax) to send the form variables to the remote site on submit

oceania 09-04-2008 05:29 PM

nice to see someone helping just because they can
:)
hugs to you

stickyfingerz 09-04-2008 05:50 PM

Is this thread like a Mexican house painter offering to paint your fully customized 57 chevy? FOR FREE?

GigoloShawn 09-04-2008 05:51 PM

Quote:

Originally Posted by stickyfingerz (Post 14710155)
Is this thread like a Mexican house painter offering to paint your fully customized 57 chevy? FOR FREE?

...it gets wet and you find that the seats were stuffed with horse shit?

Yeah, this is the one.

fluffygrrl 09-04-2008 11:31 PM

Quote:

Originally Posted by GigoloShawn (Post 14709690)
You're fucking kidding, right?

Loading a text file for each hit, not using SHM or some other caching, and an entire lack of knowledge of ip2long()?

Please tell me you're not doing this professionally. This dumb thing is... just stupid. Hell, if this is all of the functionality you require, have someone install mod_geoip and use the built-in functions for Apache; it will load into SHM and not do an incredibly dumb foreach() match for everything. This is worse than a bubblesort.

P.S. When you find a match, break from the loop.

Now now, settle down.

If what you want to use php to get a variable with the country code, you will end up having to use php to get a variable loaded with the country code. There'd obviously be better ways to solve this problem, but this is what was originally requested, a simple way to solve it, that can be dropped into various projects w/o hassle.

Incidentally, if you want to filter or redirect hits you're better off putting ip lists in your hosts or htaccess than using php to begin with.

Why are you so aggro anyway ?

fluffygrrl 09-04-2008 11:38 PM

Quote:

Originally Posted by acctman (Post 14709836)
does it matter if i use Update to insert new data into mysql or should I always use INSERT for new data and UPDATE for changing?

This depends on what exactly you're trying to accomplish and how.

Off the top of my head, INSERT allows for ON DUPLICATE KEY UPDATE, which can also use a compound (unique) key to check for duplication. This is very userful. For example:
If you have a log table to log hits to different websites daily, with "site_id"-s and "time" fields, where neither of them are primary keys, but togethether they are unique, then you can create a key on them, and then use "...ON DUPLICATE KEY..."

There's also the issue of permissions, where UPDATE only requires UPDATE priviledges whereas INSERT requires both INSERT and UPDATE, which might or might not be an issue.

I'm sure there's more.

fluffygrrl 09-04-2008 11:45 PM

Quote:

Originally Posted by pussyserver (Post 14710036)
thank you ok heres the situation

the form receving the user input is a php form on one domain and I want to pipe the inputed data to a form located on another domain so it would appear as if the form data was posted directly at the remote domain

thanks in advance

Well, suppose you have http://domain1.com/form1.php and http://domain2.com/form2.php as your two forms.

Now, on form1.php, make sure you include

<FORM action="http://domain2.com/form2.php" method="post">

In form2.php, make sure you include

<input type="checkbox" name="item_name" value="<?php echo $_POST["item_name"]; ?>">

Make sure you use the same item_name in both forms, and make sure you do this for every input element on the 2nd forum.

Cheers.

fluffygrrl 09-05-2008 04:49 AM

Quote:

Originally Posted by oceania (Post 14710066)
nice to see someone helping just because they can
:)
hugs to you

Hugs right back hehe

pussyserver - BANNED FOR LIFE 09-06-2008 03:28 AM

Quote:

Originally Posted by fluffygrrl (Post 14711260)
Well, suppose you have http://domain1.com/form1.php and http://domain2.com/form2.php as your two forms.

Now, on form1.php, make sure you include

<FORM action="http://domain2.com/form2.php" method="post">

In form2.php, make sure you include

<input type="checkbox" name="item_name" value="<?php echo $_POST["item_name"]; ?>">

Make sure you use the same item_name in both forms, and make sure you do this for every input element on the 2nd forum.

Cheers.

ok thanks i will give it a try and let everyone know how it works

whats the going rate for coders these days anyway?

mrkris 09-06-2008 04:11 PM

:) :) :)

Quote:

Originally Posted by Retox Josh (Post 14709699)
You know nothing! :1orglaugh


GigoloShawn 09-06-2008 04:16 PM

Quote:

Originally Posted by fluffygrrl (Post 14711215)
Now now, settle down.

If what you want to use php to get a variable with the country code, you will end up having to use php to get a variable loaded with the country code. There'd obviously be better ways to solve this problem, but this is what was originally requested, a simple way to solve it, that can be dropped into various projects w/o hassle.

Incidentally, if you want to filter or redirect hits you're better off putting ip lists in your hosts or htaccess than using php to begin with.

Why are you so aggro anyway ?

Your system does more harm than good. That's why I called you out on it; sometimes it's better not to have something than to have something detrimental. Much like a homebrew blog that does a 'SELECT * FROM `table`', this system is beyond suboptimal - it shows you have put no thought into the actual design, even if it's an amazingly trivial thing - if it's called once per page hit, that's outright dangerous.

Even when it FINDS one, it doesn't break; it keeps on going straight through, so, hey, yeah, I see you, but I'm still calling the next 1,000 to see if maybe you fit those, too.

So, you don't know the easiest way to compute the ip, you're using a text lookup table, and you're gonna be killing that CPU for a few moments as well as the unnecessary overhead.

You've made a functional, but not viable solution. Don't do that.


All times are GMT -7. The time now is 06:51 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123