1

Ok never mind just another thing stuffed up about the new Daniweb I can't seem to find a way to live chat someone. Nevermind, when you're trying the script online are the 'POST_ID_TWO' and 'POST_ID_THREE' still there? if so try removing them, so removing them will look like this

    $posts = [
        "GROUP1" => [
            "565167146975015"
        ],
        "GROUP2" => [
            "1727257750831063"
        ],
        "GROUP3" => [
            "494510417393925"
        ]
    ];
1

Hello,
This script can either be ran locally on a computer using a program such as Wamp or even run it on a server like on a website then just run a Cronjob to execute it.

A cheap solution to this is registering with a free PHP website host then putting the script on there and just Google that basics of how to setup a Cronjob.

1

Yep number 1 for me!

-> You know what'll be a good idea.
-> What?
->How about we remove subgroups so this way users will have to look harder for topics to either get help with or look through to help others!

What the heck happened to user friendly? Ease of use?
Taking away subgroups doesn't only make it harder to find things but it from what I can imagine would make it harder to get help! Eg. people who want to give just PHP help now have to search the tag PHP which will give them multiple articles that contain the PHP tag. Nope you just lost a point. Don't think I'll be donating again if/ until this is fixed. I've dontated multiple times in the past and won't until I see and improvement. To see that this is what my money has gone towards, nope... don't like it.

For the sake of a user friendly experience, please fix it! if I want to give just PHP help, so be it!

3

Hello Daniweb Community,
I have been talking on a couple Facebook groups such as sale pages where you post your own stuff for people to buy. Most groups like this have rules about bumping like once per day, every 12 hours etc...
So it got to the point where it became annoying to have to bump my posts every so oftern so I managed to construct this script that'll do it automatically with the help of a cronjob that can be set to bump at whatever time you like. So I have made a simple easy to use (ha may not easy to understand) script that'll bump and delete the "bump" comment that keep your post clean of exsessive bump comments.

Sorry but I made this a little while ago and forgot how I got my token, so you'll have to "Google" it. Once you've entered your token start gathering your pages.

So this section of the code here

$posts = [
    "PAGE_NAME_GOES_HERE(This is only for your piece of mind knowing what page the ID's are for)" => [
        "POST_ID_ONE",
        "POST_ID_TWO",
        "POST_ID_THREE"
    ],
    "PAGE_NAME_GOES_HERE(This is only for your piece of mind knowing what page the ID's are for)" => [
        "POST_ID_ONE",
        "POST_ID_TWO",
        "POST_ID_THREE"
    ]
];

So as it say the page name is only so you know what page the ID's belong to, now for the POST ID (AKA the permenent link) example look at this link https://www.facebook.com/groups/YOUR_CHOSEN_GROUP/permalink/HERE_IS_THE_POST_ID/ to get the ID on when you look at the post, just ...

1

Hello Community,
I'm trying to use dynamic subdomains which works but I'm only wanting .htaccess to to send subdomains without letters, numbers and underscores (_) to the 404 page. Here is my code.

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /

#Remove www.
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [QSA,NC,L]

#Example: http://example.com/directory/name
RewriteRule ^([a-z0-9_]+)$ http://example.com/directory/index.php?name=$1 [P,L]

#vv This Section vv
#Example: http://name.example.com
RewriteCond %{HTTP_HOST} ^([a-z0-9_]+).example.com [NC]
RewriteRule ([a-z0-9_]+) http://example.com/directory/index.php?name=%1 [P,L]
#^^ This Section ^^

#Remove .php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]

So if someone tries to use a subdomain that doesn't (only) contain letters, numbers and underscores (_) I would like them to be sent to the 404 page, but not so the 404 page is seen in the address bar like http://example.com/404.php but like http://name.example.com

1

Hello Community,
I have been looking for a facebook news feed api, i couldn't find one. All i could find is bits of script for construct my own news feed api.

So thats what i did and i thought i might share the script with you it's a bit messy but it works.

Here is how t use it:

  1. Goto https://www.facebook.com/developers and login.
  2. Click "Create New App". 6ecbba8247b18cca50e467f8ce0063b1
  3. Enter an app name i've used "NewsFeed" make sure it's valid then leave app namespace blank and web hosting un-ticked then click "Continue". 6cf853eeb15bfc42f6953659d6a43676
  4. Then copy and paste the script:

Then to get your access token goto https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=PUT_APP_ID_HERE&client_secret=PUT_APP_SECRET_HERE

I hope you found this tutorial easy to follow, but if you have any question just leave a comment below and i will get back to you.