Web Development Questions That Don't Need Their Own Thread v2
3,079 replies, posted
[QUOTE=Smashman;33000701]None at all.[/QUOTE]
i don't think you can make get requests to that server then.
check it out here
[url]https://developer.mozilla.org/En/HTTP_access_control[/url]
But it's worked for almost everyone...
What!?
i dun like /index.php/ but i have this /css sub file how can i access when i have /index.php/ disabled to /
[editline]28th October 2011[/editline]
oh i fixed it with
[code]RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f[/code] :v:
[QUOTE=Ac!dL3ak;33000753]i don't think you can make get requests to that server then.
check it out here
[url]https://developer.mozilla.org/En/HTTP_access_control[/url][/QUOTE]
You can make a workaround for this.
PHP's file_get_contents() function also works cross-domain. Make a PHP file that requests a specific file on another website.
Something like
[PHP]
<?= file_get_contents($_POST['url']) ?>
[/PHP]
Im using this for Tinyurl stuph.
[B]Edit:[/B]
Not secure, [B]make a filter for this.[/B]
[php]
<?
$allowed = array('http://*********com/api-create.php?url=');
foreach($allowed as $v) {
if(strpos($_POST['url'], $v) === 0) {
echo file_get_contents($_POST['url']);
exit();
}
}
echo 'Nope.avi';
?>
[/php]
That's terribly insecure and php short tags aren't enabled by default.
[QUOTE=Jelly;33005399]That's terribly insecure and php short tags aren't enabled by default.[/QUOTE]
Oops, didnt think about that.. Gonna make a filter then.
[B]Edit:[/B]
Using this now:
[php]
<?
$allowed = array('http://*********com/api-create.php?url=');
foreach($allowed as $v) {
if(strpos($_POST['url'], $v) === 0) {
echo file_get_contents($_POST['url']);
exit();
}
}
echo 'Nope.avi';
?>
[/php]
What if I had a url like [URL]http://hackersite.com/http://*********com/api-create.php?url=[/URL]?
[QUOTE=Jelly;33005545]What if I had a url like [URL]http://hackersite.com/http://*********com/api-create.php?url=[/URL]?[/QUOTE]
[php]if(strpos($_POST['url'], $v) === 0) {[/php]
Must be at the beginning
Do you think that when you first start programming in PHP you should first explore it all on your own or rather start with a Framework?
[QUOTE=commander204;33008063]Do you think that when you first start programming in PHP you should first explore it all on your own or rather start with a Framework?[/QUOTE]
I dont and have never used a framework for any language other than Javascript. (I use jQuery for that)
I'd say never to use a framework when you're learning a new language. It adds extra abstraction and makes things more complex for a begineer who has just started learning. Baby steps.
[QUOTE=Jelly;33005399]That's terribly insecure and php short tags aren't enabled by default.[/QUOTE]
i thought it was just <? ?>
[QUOTE=zzlawlzz;33008561]i thought it was just <? ?>[/QUOTE]
Those are short tags, they are disabled by default.
[QUOTE=StinkyJoe;33008657]Those are short tags, they are disabled by default.[/QUOTE]
ya I was looking at <?= ?> didn't noticed that he had <? ?>
[img]http://puu.sh/7IEf[/img]
Would you say that using tables in these cases is acceptable? ( Only the form. )
[QUOTE=commander204;33009346][img]http://puu.sh/7IEf[/img]
Would you say that using tables in these cases is acceptable? ( Only the form. )[/QUOTE]
i wouldn't
[QUOTE=commander204;33009346][img]http://puu.sh/7IEf[/img]
Would you say that using tables in these cases is acceptable? ( Only the form. )[/QUOTE]
I would say it looks fine to me. aligning input with labels can be painful.
You should text-align:right; for the labels.
[QUOTE=Ac!dL3ak;33009355]i wouldn't[/QUOTE]
Well the way I see it, Forms are almost a form of Tabular Data, you have a field and a description of a field. Those are the two rows.
[QUOTE=commander204;33009415]Well the way I see it, Forms are almost a form of Tabular Data, you have a field and a description of a field. Those are the two rows.[/QUOTE]
no i know i'm just saying i wouldn't do that myself
you can do that if you want
[QUOTE=commander204;33009415]Well the way I see it, Forms are almost a form of Tabular Data, you have a field and a description of a field. Those are the two rows.[/QUOTE]
Or you can just float divs to the left for the same thing without the extra work of a table.
Should I stick with LithiumHosting's $10/mo unlimited plan or should I switch to FanaticalVPS's micro/mini plan?
[QUOTE=Known Havok;33011310]Should I stick with LithiumHosting's $10/mo unlimited plan or should I switch to FanaticalVPS's micro/mini plan?[/QUOTE]
We'll need more details to help you make that choice. I'm sure Fizzadar will appreciate the extra 10/15$, however.
[QUOTE=StinkyJoe;33012091]We'll need more details to help you make that choice. I'm sure Fizzadar will appreciate the extra 10/15$, however.[/QUOTE]
Well, I want to host multiple websites, optionally with the bonus of it being a VPS. However I don't want to give up the functionality of cpanel (if it's not on a vps)
[QUOTE=Known Havok;33012749]Well, I want to host multiple websites, optionally with the bonus of it being a VPS. However I don't want to give up the functionality of cpanel (if it's not on a vps)[/QUOTE]
Im pretty sure you can do more/same amount of stuff on vps compared to cpanel
[QUOTE=Known Havok;33012749]Well, I want to host multiple websites, optionally with the bonus of it being a VPS. However I don't want to give up the functionality of cpanel (if it's not on a vps)[/QUOTE]cPanel is just a fancy interface. Everything you can do in cPanel you can do manually with your vps
do you guys have any tip for secure file upload? (image upload)
[editline]29th October 2011[/editline]
-snip- problem solved
[QUOTE=TehWhale;33014786]cPanel is just a fancy interface. Everything you can do in cPanel you can do manually with your vps[/QUOTE]
Would you recommend a vps over shared web hosting? As I see it, they're both $10/mo, unmetered bandwidth and have a good connection
[QUOTE=Known Havok;33016987]Would you recommend a vps over shared web hosting? As I see it, they're both $10/mo, unmetered bandwidth and have a good connection[/QUOTE]If you know how to use it, yes.
[QUOTE=Known Havok;33016987]Would you recommend a vps over shared web hosting? As I see it, they're both $10/mo, unmetered bandwidth and have a good connection[/QUOTE]
With shared hosting they're just giving you a folder on a web server and a control panel. On a VPS you have choice of what tools you use.
[editline]Fake editline to add emphasis on the "Leaving" part. If you're quoting this, yes, I get it, I shouldn't post here, but I feel that I had something intelligent to add to this converstation. If you feel that this isn't the case then I will gladly snip this post.[/editline]
Yes, I'm leaving, I'm leaving.
[QUOTE=TehWhale;33017028]If you know how to use it, yes.[/QUOTE]
How would you do the things you could do with cpanel?
Sorry, you need to Log In to post a reply to this thread.