0o0o0 Posted January 31, 2013 Share Posted January 31, 2013 (edited) what im trying to do is make a single button or page url submission, for after I create websites for clients.. simply click and she goes. The ones out there now are sending urls to spammers, and emails to spammer companies.. When you do a website for someone and 3 weeks later they say the mail is discusting, repetitive they dont know whats business and whats junk. I just want to make my own private and control the places it submits too. Without giving some third party my clients new url and email address. This works but ONLY on the last entry.. so say 10 in DB.. it only visits the 10th. Ive read some "array" threads but just need a tiny tiny bit of help on what I may be doing wrong. thanks! <?php $sql = mysql_query("SELECT domainonly FROM urlsubmitdb"); while($line = mysql_fetch_assoc($sql)){ $domainonly[] = $line; } foreach($domainonly as $e){ $d = 'http://www.'; $f = '/blabla=123&blabla=submitexamplelink'; $e = $e['domainonly']; $g = "$d$e$f"; header('location:'.$g); usleep(3000000); // 3000000 wait for 3 seconds ?> Cant be all that bad code, the lights are still on in Manhatten! Edited January 31, 2013 by 0o0o0 Quote Link to comment https://forums.phpfreaks.com/topic/273883-help-on-creating-a-simple-url-submission/ Share on other sites More sharing options...
requinix Posted February 1, 2013 Share Posted February 1, 2013 (edited) You can't do a header() redirect to multiple locations at once. The browsers will ignore everything up to the last one. Rethink how you want users to do this. Maybe your script can submit the URLs directly? [edit] Code critique: please don't use one letter variable names for non-trivial variables. $d = 'http://www.'; What the heck does $d mean? header('location:'.$g); What was $g? What does it mean? In your short code sample it's easy to scroll up, but when you do it to code with hundreds of lines (or more) you're only creating grief for those who have to read it. Including yourself in the future. Edited February 1, 2013 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/273883-help-on-creating-a-simple-url-submission/#findComment-1409404 Share on other sites More sharing options...
0o0o0 Posted February 1, 2013 Author Share Posted February 1, 2013 (edited) critique? Edited February 1, 2013 by 0o0o0 Quote Link to comment https://forums.phpfreaks.com/topic/273883-help-on-creating-a-simple-url-submission/#findComment-1409424 Share on other sites More sharing options...
requinix Posted February 1, 2013 Share Posted February 1, 2013 Question? Quote Link to comment https://forums.phpfreaks.com/topic/273883-help-on-creating-a-simple-url-submission/#findComment-1409427 Share on other sites More sharing options...
0o0o0 Posted February 1, 2013 Author Share Posted February 1, 2013 Your weird. Quote Link to comment https://forums.phpfreaks.com/topic/273883-help-on-creating-a-simple-url-submission/#findComment-1409428 Share on other sites More sharing options...
requinix Posted February 1, 2013 Share Posted February 1, 2013 *You're. Quote Link to comment https://forums.phpfreaks.com/topic/273883-help-on-creating-a-simple-url-submission/#findComment-1409429 Share on other sites More sharing options...
0o0o0 Posted February 2, 2013 Author Share Posted February 2, 2013 I Kick You Quote Link to comment https://forums.phpfreaks.com/topic/273883-help-on-creating-a-simple-url-submission/#findComment-1409628 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.